Unable to use in Android 23 due to noclassdeffounderror: ljava/util/optional
See original GitHub issueIssue: Unable to use (iota-java:1.0.0-beta2) on Android API < 24 due to the usage of java.util.Optional in Signing.java
There is still a considerable percentage (~22%) of Android users on API 23 Marshmallow. It would be great to set the compatibility, so, that there will be no surprises on Android.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: amiin.bazouk.application.com.demo_bytes_android, PID: 3110
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/Optional;
at jota.utils.Signing.<init>(Signing.java:30)
at jota.utils.IotaAPIUtils.newAddress(IotaAPIUtils.java:39)
at jota.IotaAPI.generateNewAddresses(IotaAPI.java:148)
at jota.IotaAPI.getNextAvailableAddress(IotaAPI.java:81)
at amiin.bazouk.application.com.demo_bytes_android.iota.Iota.getCurrentAddress(Iota.java:88)
at amiin.bazouk.application.com.demo_bytes_android.iota.Account.getCurrentAddress(Account.java:85)
at amiin.bazouk.application.com.demo_bytes_android.MainActivity.getBalance(MainActivity.java:762)
at amiin.bazouk.application.com.demo_bytes_android.MainActivity.access$1600(MainActivity.java:61)
at amiin.bazouk.application.com.demo_bytes_android.MainActivity$6.onClick(MainActivity.java:244)
at android.view.View.performClick(View.java:5198)
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How to fix java.lang.NoClassDefFoundError on android api ...
My application runs fine with my android api level 23 , when I tried to run it on another android api level 19...
Read more >NoClassDefFoundError - Android Developers
NoClassDefFoundError ; NoClassDefFoundError ... as part of creating a new instance using the new expression) and no definition of the class could be...
Read more >How to Resolve the NoClassDefFoundError in Java - Rollbar
NoClassDefFoundError is a Java error that occurs when the JVM is unable to find a class at runtime which was available at compile-time....
Read more >Andriod API < 24 -> NoClassDefFoundError: Failed resolution of
With mockito-android 3.5.15 on Android API 23 we are getting this error below, it works fine with 3.4.6.
Read more >crash in Android IMA sdk 3.11.0 - Google Groups
NoClassDefFoundError Failed resolution of ConcurrentHashMap; crash in Android IMA ... since upgrade of the Android IMA SDK 3.11.0 I am getting the crash....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kwek20 No feedback on this topic for almost a year and a half. Can’t we close the ticket?
Hey @pasupulaphani,
I see in the StreamSupport issue, they mentioned ProGuard. Did you try that? Seems to be a good solution, we wont need to go backwards or implement a library, and you can use it in android <24.
If you make a new jar out of our latest release, using ProGuard, and link to that jar when building for Android, that seems to solve the problem.
Otherwise it would be in the 1.0.0 final release, no ETA yet though, we are still scoping functionality.