Backendless 4.0: NoClassDefFoundError


I’m testing Backendless 4 in my own server and I’m getting this error when I’m trying to retrieve a list of items.
The problem happen for this line:

List<Contact> data = Backendless.Persistence.of( Contact.class ).find();

I tried this too:

List<Contact> data = Backendless.Data.of( Contact.class ).find();

same issue,
the error in console is:

java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(
    at java.util.concurrent.FutureTask.finishCompletion(
    at java.util.concurrent.FutureTask.setException(
    at android.os.AsyncTask$SerialExecutor$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
 Caused by: java.lang.NoClassDefFoundError: java.util.Objects
    at com.backendless.Persistence.find(
    at com.backendless.DataStoreFactory$1.find(
    at com.nextlevel.bel4t2.MainActivity$BackgroundTask.doInBackground(
    at com.nextlevel.bel4t2.MainActivity$BackgroundTask.doInBackground(
    at android.os.AsyncTask$

in Backendless 3 everything fine, also getting single item is fine.

Thank you.

Hi Mohammed,

please make sure you are using 4 version of SDK for you Backendless 4.0 instance.

Hello Grin,

I’m using this in my Gradle file

 compile 'com.backendless:backendless:4.0.0+'

That’s correct. Thank you for reporting this issue, we will investigate it and fix as soon as possible.

You can reference to internal ticket by it’s ID: BKNDLSS-14034

Our developer can’t reproduce this issue. Could you generate project template and try to reproduce your issue there?

Hello Grin,

In the attachment sample project that have the issue, it only contain a button to run the above line of code.

I tried to generate template but it gives me the same error.
to make it clear, I can get items by id with out issue but when I try to get them as a list from Backendless I get the error.

Thank you. (27.2MB)

Mohammed, by “project template”, Stanislaw meant this feature:

Hello Mark,

Yes I used the generated project from Backendless and I get the same error.

  • attachment below is Backendless template with call to the above code producing the error.

Thank you. (18.29MB)


what if you change the following line in build.gradle (Module:app):

minSdkVersion 16

change to:

minSdkVersion 19

The reason for the change is the class the exception complains about (java.util.Objects) was added in API 19.


Hello Mark,

Yes that fix the problem, is there a way to make it compatible with 16?

Thank you.

Hi Mohammed,

API 16 is Android 4.1, which according to the source below has only 5.6% market share:

We would not be able to allocate resources to make it compatible, however, the SDK is open source and you are welcome to fork it and make the changes yourself.


Thank you Mark.