Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException on Android #14

Closed
saket opened this issue Dec 5, 2022 · 7 comments
Closed

NullPointerException on Android #14

saket opened this issue Dec 5, 2022 · 7 comments

Comments

@saket
Copy link

saket commented Dec 5, 2022

Hey @Anamorphosee, I'm running into this crash when trying to use SD on Android:

Caused by: java.lang.NullPointerException: it must not be null
        at dev.reformator.stacktracedecoroutinator.runtime.DecoroutinatorRuntime.load(runtime-android.kt:38)
        at dev.reformator.stacktracedecoroutinator.runtime.DecoroutinatorRuntime.load$default(runtime-android.kt:24)

The android artifact isn't an AAR so I wasn't able to step into the sources to debug what exactly is null. I was testing on Android 13.

@Anamorphosee
Copy link
Owner

Hi, @saket.
Could you please check if there is a file decoroutinatorBaseContinuation.dex in your APK?
And how do you declare a dependency on SD?

It's an AAR artifact https://repo1.maven.org/maven2/dev/reformator/stacktracedecoroutinator/stacktrace-decoroutinator-android/2.3.3/stacktrace-decoroutinator-android-2.3.3.aar

@astuetz
Copy link

astuetz commented Jan 30, 2023

Hi, I'm running into the same problem. I included the dependency as described on your readme for Android. Also there's no decoroutinatorBaseContinuation.dex inside the apk.

@Anamorphosee
Copy link
Owner

@astuetz Hi, maybe ProGuard deletes the file decoroutinatorBaseContinuation.dex in build time. Could you please check, if the file present if you build with

shrinkResources false
minifyEnabled false

?

@saket saket closed this as completed Jun 21, 2023
@saket saket reopened this Dec 4, 2023
@saket
Copy link
Author

saket commented Dec 4, 2023

@Anamorphosee this is happening in debug builds where code minification isn't enabled

@Anamorphosee
Copy link
Owner

Fixed in 2.3.8. @saket Could you check please?

@saket
Copy link
Author

saket commented Dec 9, 2023

Thanks, that was quick. I'll try it out and report back!

@saket
Copy link
Author

saket commented Dec 25, 2023

Your fix works, but I'm now running into #23 🙂.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants