Closed NicholasBertazzon closed 1 month ago
oh no! Thanks for reporting this, your workaround - to include guava directly - is functional of course but this seems like the sort of thing we should include as a transitive dep, let me see the best way to handle it. This was not intended as a breaking change - and having to modify buid.gradle is definitely breaking - or I would have issued it as a semver major. Hopefully I can just do a patch release that fixes this for everyone at once
@NicholasBertazzon we are using these two lines (in the core library AAR, but not at the module level)
What happens if you reach in (via direct modification, and if it works via patch-package until fixed here) to the node_modules/@notifee/react-native/android/build.gradle
file and add the same lines there?
I'm still investigating locally but that's my best guess at a fix pre-testing
Okay, reproduced on the crash - sorry again for that:
10-07 08:33:35.570 6839 6839 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/util/concurrent/MoreExecutors;
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at app.notifee.core.Notifee.<clinit>(SourceFile:3)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at io.invertase.notifee.NotifeeInitProvider.onCreate(NotifeeInitProvider.java:20)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2619)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2589)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at app.notifee.core.InitProvider.attachInfo(SourceFile:7)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:7765)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:7276)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6983)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:205)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.os.Looper.loop(Looper.java:294)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8177)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.common.util.concurrent.MoreExecutors" on path: DexPathList[[zip file "/data/app/~~4rC8IOrbR_iIvM82Fq311g==/com.notifeedemo-2DRFDfVKDL9n5A73DQ7j8g==/base.apk"],nativeLibraryDirectories=[/data/app/~~4rC8IOrbR_iIvM82Fq311g==/com.notifeedemo-2DRFDfVKDL9n5A73DQ7j8g==/lib/arm64, /data/app/~~4rC8IOrbR_iIvM82Fq311g==/com.notifeedemo-2DRFDfVKDL9n5A73DQ7j8g==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
10-07 08:33:35.570 6839 6839 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:637)
This points to a couple issues, one is this crash itself, which I confirm is fixed, merely by adding this to the module's build.gradle (directly, and/or via patch-package, or to your app's build.gradle but that shouldn't be necessary):
implementation("com.google.guava:guava:33.3.1-android") // https://github.com/google/guava
second issue is that nothing like a startup crash should ever slip through CI and as a secondary thing I'll make sure this can't happen again.
Release with a fix coming shortly and thanks again for reporting
released just now as 9.1.1
Sorry I was busy, yes working now, thanks
I resolved by including
implementation("com.google.guava:guava:33.3.1-jre")
in the build.gradle, if needed should be added on the release upgrade changes?