Cannot use backendless since the latest version both. both with maven or jar

  1. This is the error that I receive when I use this line
    compile files(‘libs/backendless.jar’) in build.gradle. after running my app:

java.lang.ExceptionInInitializerError
at com.backendless.Backendless.initApp(Backendless.java:124)
at com.taldroid.apps.tapextreme.TapExtremeApplication.onCreate(TapExtremeApplication.java:25)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4579)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: weborb.writer.specialized.TypedDictionary
at weborb.writer.MessageWriter.initWriters(MessageWriter.java:131)
at weborb.writer.MessageWriter.<clinit>(MessageWriter.java:64)
at com.backendless.Backendless.initApp(Backendless.java:124)
at com.taldroid.apps.tapextreme.TapExtremeApplication.onCreate(TapExtremeApplication.java:25)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4579)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)

I found this in the idea.log file:

01:13:04,928 [106917257] WARN - penapi.vfs.impl.jar.JarHandler - error in opening zip file: D:/AndroidStudioProjects/TapExtreme/app/libs/backendless.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:214)
at java.util.zip.ZipFile.<init>(ZipFile.java:144)
at java.util.zip.ZipFile.<init>(ZipFile.java:115)
at com.intellij.openapi.util.io.ZipFileCache.tryOpen(ZipFileCache.java:127)
at com.intellij.openapi.util.io.ZipFileCache.acquire(ZipFileCache.java:104)
at com.intellij.openapi.vfs.impl.ZipHandler.getZipFile(ZipHandler.java:67)
at com.intellij.openapi.vfs.impl.ZipHandler.createEntriesMap(ZipHandler.java:46)
at com.intellij.openapi.vfs.impl.ArchiveHandler.getEntriesMap(ArchiveHandler.java:113)
at com.intellij.openapi.vfs.impl.ArchiveHandler.getEntryInfo(ArchiveHandler.java:97)
at com.intellij.openapi.vfs.impl.ArchiveHandler.list(ArchiveHandler.java:83)
at com.intellij.openapi.vfs.newvfs.ArchiveFileSystem.list(ArchiveFileSystem.java:143)
at com.intellij.openapi.vfs.newvfs.persistent.RefreshWorker.processQueue(RefreshWorker.java:132)
at com.intellij.openapi.vfs.newvfs.persistent.RefreshWorker.scan(RefreshWorker.java:95)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.scan(RefreshSessionImpl.java:133)
at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.doScan(RefreshQueueImpl.java:103)
at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.access$100(RefreshQueueImpl.java:41)
at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl$1.run(RefreshQueueImpl.java:80)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

  1. and this is the error that I receive during gradle build when trying with this line:
    compile ‘com.backendless:android:3.0.8.1’

‘Error:(51, 13) Failed to resolve: com.backendless:android:3.0.8.1’

Your gradle reference is wrong. The right one is:

compile ‘com.backendless:backendless:3.0.8.1’

// Not working having same problem

minSdkLevel 15
tagetSdkLevel 23

\\\\\\ProGurad////////////
-dontwarn com.backendless.**
-dontwarn weborb.**
-keep class weborb.** {;}
-keep class com.backendless.** {
;}
\\\\\\Build.gradle//////////////
defaultConfig(…
multiDexEnabled true
…}
dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’])
testCompile ‘junit:junit:4.12’
compile ‘com.android.support:appcompat-v7:23.3.0’
compile ‘com.android.support:design:23.3.0’
compile ‘com.backendless:backendless:3.0.15.1’
compile ‘com.google.android.gms:play-services:8.4.0’
compile ‘me.drakeet.materialdialog:library:1.3.1’
}
but works if I remove this last library it starts working… I also changed library just in case but same result…

Please solve this problem because I need this and other libraries as well…
(It maybe has something to do with 65k limit)

Look for the answer here (see the one marked as “Best Answer”): http://support.backendless.com/t/java-lang-noclassdeffounderror-weborb-types-types-and-java-lang-exceptionininitializererror