NoClassDefFoundError
JordanLongstaff opened this issue · 2 comments
JordanLongstaff commented
My Android app crashes on load because of this error.
04-13 17:43:12.120 2604-2604/com.encircle E/dalvikvm: Could not find class 'de.jkeylockmanager.manager.implementation.lockstripe.-$$Lambda$StripedKeyLockManager$Q7lCNjZOz4-zbPVFixAXIfxGWoc', referenced from method de.jkeylockmanager.manager.implementation.lockstripe.StripedKeyLockManager.<init>
04-13 17:43:12.120 2604-2604/com.encircle E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: de.jkeylockmanager.manager.implementation.lockstripe.-$$Lambda$StripedKeyLockManager$Q7lCNjZOz4-zbPVFixAXIfxGWoc
at de.jkeylockmanager.manager.implementation.lockstripe.StripedKeyLockManager.<init>(StripedKeyLockManager.java:84)
at de.jkeylockmanager.manager.implementation.lockstripe.StripedKeyLockManager.<init>(StripedKeyLockManager.java:62)
at de.jkeylockmanager.manager.KeyLockManagers.newLock(KeyLockManagers.java:60)
...
JordanLongstaff commented
I figured out the reason. You're using Arrays.setAll
and passing in a lambda, but Arrays.setAll
requires Android SDK level 24, but my app's minimum SDK version is 16.
I'm going to need you to revert your use of lambdas in the StripedKeyLockManager
back to a for
loop.
JordanLongstaff commented
Actually, I notice that version 2.0.0 introduced use of Java 8 - is that change the only difference between version 1.2.0 and version 2.1.0? If so, you can probably ignore this.