andymc Well-Known Member Licensed User Longtime User Feb 11, 2020 #1 I'm seeing this on the Google play console for the latest update to my app: I have no idea what's causing it. I've recently added firebase analytics custom events, which seemed to be working fine. Code: Copy java.lang.ClassNotFoundException dalvik.system.BaseDexClassLoader.findClass java.lang.RuntimeException: at android.app.ActivityThread.handleCreateService (ActivityThread.java:3743) at android.app.ActivityThread.access$1400 (ActivityThread.java:237) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1801) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:214) at android.app.ActivityThread.main (ActivityThread.java:7050) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965) Caused by: java.lang.ClassNotFoundException: at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass (ClassLoader.java:379) at java.lang.ClassLoader.loadClass (ClassLoader.java:312) at android.app.AppComponentFactory.instantiateService (AppComponentFactory.java:103) at android.app.ActivityThread.handleCreateService (ActivityThread.java:3738)
I'm seeing this on the Google play console for the latest update to my app: I have no idea what's causing it. I've recently added firebase analytics custom events, which seemed to be working fine. Code: Copy java.lang.ClassNotFoundException dalvik.system.BaseDexClassLoader.findClass java.lang.RuntimeException: at android.app.ActivityThread.handleCreateService (ActivityThread.java:3743) at android.app.ActivityThread.access$1400 (ActivityThread.java:237) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1801) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:214) at android.app.ActivityThread.main (ActivityThread.java:7050) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965) Caused by: java.lang.ClassNotFoundException: at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass (ClassLoader.java:379) at java.lang.ClassLoader.loadClass (ClassLoader.java:312) at android.app.AppComponentFactory.instantiateService (AppComponentFactory.java:103) at android.app.ActivityThread.handleCreateService (ActivityThread.java:3738)
andymc Well-Known Member Licensed User Longtime User Feb 11, 2020 #2 this is only happening on Android 9 and 10 devices Upvote 0
andymc Well-Known Member Licensed User Longtime User Feb 11, 2020 #3 Could it be related to this? Firebase AdMob v1.6 problem I am trying to follow this https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/#post-678483 but without success. "If the app immediately crashes then it is likely that the app id is wrong. Start with the sample app id and then change it to your app id." Yes, my apps crash... www.b4x.com Upvote 0
Could it be related to this? Firebase AdMob v1.6 problem I am trying to follow this https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/#post-678483 but without success. "If the app immediately crashes then it is likely that the app id is wrong. Start with the sample app id and then change it to your app id." Yes, my apps crash... www.b4x.com
andymc Well-Known Member Licensed User Longtime User Feb 11, 2020 #4 okay, I've managed to recreate the error on my own device now (downloaded the app from the store) It's complaining that it can't find the class anywheresoftware.b4a.objects.FirebaseNotificationsService Will check the manifest, libraries and source for clues..... Any test version I'll post in the beta channel on the store first to test, before promoting to prod, as right now prod is dead, but I don't want to hurt customers by posting an equally dead version by testing this fix can't connect to my Azure based dev VM from work, will have to wait till this evening after everyone goes to bed at home.... Upvote 0
okay, I've managed to recreate the error on my own device now (downloaded the app from the store) It's complaining that it can't find the class anywheresoftware.b4a.objects.FirebaseNotificationsService Will check the manifest, libraries and source for clues..... Any test version I'll post in the beta channel on the store first to test, before promoting to prod, as right now prod is dead, but I don't want to hurt customers by posting an equally dead version by testing this fix can't connect to my Azure based dev VM from work, will have to wait till this evening after everyone goes to bed at home....
DonManfred Expert Licensed User Longtime User Feb 11, 2020 #5 andymc said: It's complaining that it can't find the class anywheresoftware.b4a.objects.FirebaseNotificationsService Click to expand... I guess it is because of A) An outdated SDK. Maybe worth to reinstall the SDK B) Outdated Firebase Libraries. Make sure to use the newest ones. Especially FirebaseAnalytics. It must be 1.12. Updates to internal libraries Updates to internal B4A libraries will be posted here. Make sure to check the library version before updating. These libraries should be copied to the internal libraries folder (Program Files\Anywhere Software\B4A\Libraries). www.b4x.com Make sure to copy it into the internal library folder. Start with fixing B first. Upvote 0
andymc said: It's complaining that it can't find the class anywheresoftware.b4a.objects.FirebaseNotificationsService Click to expand... I guess it is because of A) An outdated SDK. Maybe worth to reinstall the SDK B) Outdated Firebase Libraries. Make sure to use the newest ones. Especially FirebaseAnalytics. It must be 1.12. Updates to internal libraries Updates to internal B4A libraries will be posted here. Make sure to check the library version before updating. These libraries should be copied to the internal libraries folder (Program Files\Anywhere Software\B4A\Libraries). www.b4x.com Make sure to copy it into the internal library folder. Start with fixing B first.
andymc Well-Known Member Licensed User Longtime User Feb 11, 2020 #6 thanks @DonManfred will check that this evening Upvote 0
DonManfred Expert Licensed User Longtime User Feb 12, 2020 #7 andymc said: thanks @DonManfred will check that this evening Click to expand... Did you checked? Upvote 0
andymc Well-Known Member Licensed User Longtime User Feb 12, 2020 #8 Hi, yes it's 1.12 I still get the error. But the error goes away if I comment out the line: B4X: Copy CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) However now it no longer connect to firebase. Need to pick it apart line by line when I can find the time. Upvote 0
Hi, yes it's 1.12 I still get the error. But the error goes away if I comment out the line: B4X: Copy CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) However now it no longer connect to firebase. Need to pick it apart line by line when I can find the time.
DonManfred Expert Licensed User Longtime User Feb 12, 2020 #9 andymc said: CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) Click to expand... Which version of FirebaseNotifications are you using? Should be 1.21 Upvote 0
andymc said: CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) Click to expand... Which version of FirebaseNotifications are you using? Should be 1.21
andymc Well-Known Member Licensed User Longtime User Feb 12, 2020 #10 Okay, so let's pretend that was ticked... when I tick it, it's version 1.21. But I'm only using firebaseadmob for showing ads and firebase analytics for posting events to firebase. So do I need the notifications library enabled? I'm planning to use it soon to post pop up notifications to players soon, but not yet, so can I leave it out? Would that be what's stopping my lines: B4X: Copy public analytics as Firebaseanalytics analytics.initialize from working? They were working just a few days ago. But I'm a sinner and don't use source control so I can't tell you exactly what's changed since then. Upvote 0
Okay, so let's pretend that was ticked... when I tick it, it's version 1.21. But I'm only using firebaseadmob for showing ads and firebase analytics for posting events to firebase. So do I need the notifications library enabled? I'm planning to use it soon to post pop up notifications to players soon, but not yet, so can I leave it out? Would that be what's stopping my lines: B4X: Copy public analytics as Firebaseanalytics analytics.initialize from working? They were working just a few days ago. But I'm a sinner and don't use source control so I can't tell you exactly what's changed since then.
DonManfred Expert Licensed User Longtime User Feb 12, 2020 #11 andymc said: But I'm only using firebaseadmob for showing ads and firebase analytics for posting events to firebase Click to expand... your manifest should contain B4X: Copy CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase) CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase) CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics) CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds) The line B4X: Copy CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) is only needed when you want to use FirebaseNotifications in your app. In my understanding you do not need this line. Regarding firebase ads Make sure to adapt your code with the info in the tutorial: FirebaseAdMob v1.6 Google has added a few new requirements to AdMob implementation. You must make these changes if you are using the latest versions of Android SDK libraries (firebase-ads 18.1.1+). Instructions: 2. Find your AdMob app id and add it to the manifest editor: 'This is a sample AdMob app id. You need... www.b4x.com Upvote 0
andymc said: But I'm only using firebaseadmob for showing ads and firebase analytics for posting events to firebase Click to expand... your manifest should contain B4X: Copy CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase) CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase) CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics) CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds) The line B4X: Copy CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications) is only needed when you want to use FirebaseNotifications in your app. In my understanding you do not need this line. Regarding firebase ads Make sure to adapt your code with the info in the tutorial: FirebaseAdMob v1.6 Google has added a few new requirements to AdMob implementation. You must make these changes if you are using the latest versions of Android SDK libraries (firebase-ads 18.1.1+). Instructions: 2. Find your AdMob app id and add it to the manifest editor: 'This is a sample AdMob app id. You need... www.b4x.com