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

ClassNotFoundException after installing @superwall/react-native-superwall on Xiaomi Redmi 9T #8

Open
khanhkom opened this issue Jul 29, 2024 · 2 comments

Comments

@khanhkom
Copy link

image
image

After installing the @superwall/react-native-superwall library in my React Native project, I'm encountering a ClassNotFoundException on my Xiaomi Redmi 9T device. The error occurs when trying to launch the app.
Error details:
CopyCaused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ReportFragmentActivityInitializationListener"
on path: DexPathList[[zip file "/data/app/vn.com.eatsy-FFsB7KP-rqp_v8JW5dONWg==/base.apk"],nativeLibraryDirectories=[/data/app/vn.com.eatsy-FFsB7KP-rqp_v8JW5dONWg==/lib/arm64, /data/app/vn.com.eatsy-FFsB7KP-rqp_v8JW5dONWg==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
Project configuration:

Device: Xiaomi Redmi 9T
React Native version: [Please specify your RN version]
@superwall/react-native-superwall version: [Please specify the version]

Build configuration:
CopybuildToolsVersion = "34.0.0"
minSdkVersion = 26
compileSdkVersion = 34
targetSdkVersion = 34
androidXVersion = "1.0.0"
ndkVersion = "23.1.7779620"
googlePlayServicesAuthVersion = "19.2.0"
kotlinVersion = '1.8.0'
gradle version: 8.2
Steps to reproduce:

Install @superwall/react-native-superwall
Run the app on a Xiaomi Redmi 9T device
App crashes with the above ClassNotFoundException

I've tried cleaning and rebuilding the project, updating Gradle files, and ensuring the library is properly linked, but the issue persists. Any assistance in resolving this would be greatly appreciated.

@ianrumac
Copy link
Contributor

Hi @khanhkom !

This sounds like a potential Multidex error - on Android, DEX files are allowed to contain only 65.5k methods, so sometimes adding a certain library could cause it so it overflows the dex files - the ClassNotFoundException pointing to the dex file is the indicator. Could you follow this guide to enable Multidex in your app and let us know if that resolves the issue?

@khanhkom
Copy link
Author

@ianrumac
Thank you for support, i follow all step in guide, but it still not working. Should we uninstall some library to solve this problem?

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

2 participants