Error code:

Exception java.lang.NoClassDefFoundError: org.quuux.sack.Sack com.pro.data.Favorites.load (Favorites.java:22) com.pro.HeadspaceApplication.onCreate (HeadspaceApplication.java:65) android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1007) android.app.ActivityThread.handleBindApplication (ActivityThread.java:4541) de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative (XposedBridge.java) de.robv.android.xposed.XposedBridge.handleHookedMethod (XposedBridge.java:631) android.app.ActivityThread.handleBindApplication (ActivityThread.java) android.app.ActivityThread.access$1500 (ActivityThread.java:151) android.app.ActivityThread$H.handleMessage (ActivityThread.java:1381) android.os.Handler.dispatchMessage (Handler.java:110) android.os.Looper.loop (Looper.java:193) android.app.ActivityThread.main (ActivityThread.java:5292) java.lang.reflect.Method.invokeNative (Method.java) java.lang.reflect.Method.invoke (Method.java:515) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640) de.robv.android.xposed.XposedBridge.main (XposedBridge.java:132) dalvik.system.NativeStart.main (NativeStart.java) 

The library has been added to build.gradle:

compile 'org.quuux.sack: sack: 0.1'

The library is used in one of my classes:

 public static void load() { try { Sack.open(String[].class, getFavoritesPath()).load(new Sack.Listener<String[]>() { @Override public void onResult(final Sack.Status status, final String[] favorites) { favoriteUrls = new ArrayList<String>(); if (favorites == null) return; favoriteUrls.addAll(Arrays.asList(favorites)); } }); } catch (Exception e){ e.printStackTrace(); } } 

I do not understand what is wrong and what is missing on some user devices. Why do some work, others do not. The version of android is mine - 7.0, which the user crashes - 4.4.2 ... The application works, it does not issue errors., But some users have unsubscribed that they immediately crash after launch. Error code took from the logs of these particular users who have crash.

line 22: with the onCreate() method ...

 Favorites.load(); 

...

line 65 of this method Favorites.load(); :

 Sack.open(String[].class, getFavoritesPath()).load(new Sack.Listener<String[]>() { @Override public void onResult(final Sack.Status status, final String[] favorites) { favoriteUrls = new ArrayList<String>(); if (favorites == null) return; favoriteUrls.addAll(Arrays.asList(favorites)); } }); 

How do I understand the exception to cause an earlier version of the android can not be? or something else is needed (option with try catch exception e) will not work ..?

  • Are you sure that the error is not from the tool test? - Eugene Krivenja
  • @EugeneKrivenja, that is? error logs took with firebase Crash Reporting. The problem is for users with 19,18,17,15 API level. So for example, everything with my android oc 7.0 works for me and does not crash. I do not understand what could be causing crash. I have an error that is in the logs, goes into the exception as it should be. and the application continues to function. - Anton
  • With the instrumental test, I seem to be in a hurry with the conclusions :) Please provide the entire build.gradle of the module. - Eugene Krivenja
  • I have already solved the problem by transferring the entire class from the connected library to my application, creating a separate class. - Anton
  • If you have solved the problem, write about this in the question marked DECISION: - MaKaRoN_IV

0