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 ..?