wordpress-mobile/PasscodeLock-Android

NoClassDefFound error

scorchio opened this issue · 3 comments

Hi,

Testing on API level 8 (AVD emulator) and 10 (Genymotion), I get the following error:

    java.lang.NoClassDefFoundError: org.wordpress.passcodelock.AbstractAppLock
            at org.wordpress.passcodelock.PasscodePreferencesActivity.onCreate(PasscodePreferencesActivity.java:39)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
            at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:130)
            at android.app.ActivityThread.main(ActivityThread.java:3683)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:507)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
            at dalvik.system.NativeStart.main(Native Method)

I usually test with API level 18 (Genymotion), where the problem doesn't occur. Could you please check what's happening there?

seems Passcode lock is supported from API level 14. This may be the reason

Yes, min API level is 14.
You can check the availability of PasscodeLock by calling the method enableDefaultAppLockIfAvailable(Application currentApp) here: https://github.com/wordpress-mobile/PasscodeLock-Android/blob/develop/library/src/org/wordpress/passcodelock/AppLockManager.java#L17