java.lang.NoClassDefFoundError: weborb.types.Types

I’m having the same problem as here, but solution from those topic not worked for me.
In my app i’m using Backendless, Google Analytics and some UI libraries. There was problem to build app, but it solved by adding “multiDexEnabled true” into build.gradle file.
When i add another libraries (from ad networks, another 8 *.jar files), which have dependencies from play-services-ads, i get exception when call Backendless.initApp(…);

Caused by: java.lang.NoClassDefFoundError: weborb.types.Types
    at com.backendless.UserService.<init>(
     at com.backendless.UserService.<clinit>(
    at com.backendless.Backendless.<clinit>( 
    at com.mypackage.activity.MyActivity.onCreate( 

I found out that problem not directly from play-service, seems it happens when there are too many libraries in project.
For example, when i’m add 5 more *.jar files (one of them add play-services-ads dependence), app works. But when i add 6 app crash. And there is no differense which library i add.

What can i do? I’m already use only those parts of libraries that i need. I can send you my project and *.jar libraries to reproduce issue.

compile ''
compile ''
compile ''
compile ''
compile ''

Please zip up your project and upload to Google Drive or Dropbox and send link to file to

Ready, i send you email.

Thanks, we received the email. A ticket has been assigned to a developer

Hi Ranzed,
Try adding this to your android closure in your build.gradle file:

dexOptions {
    javaMaxHeapSize "4g"

Let us know if it fixes the problem.

Hi Mark.
Without this statement project build fails with “java.lang.OutOfMemoryError: GC overhead limit exceeded”, i wrote it in email.

Adding this statement does not fix the problem (project successfully builds and after launch app crash with described exception).

Hi Ranzeed,

The problem is not really related to Backendless. It occurs when there are a lot of libraries and frameworks in the project. Here’s a related discussion on stackoverflow:


There’s a working answer in

(just for all that arrive to this thread in first place, xD )