Android Question Lots of crashes with latest app update on Google play store

andymc

Well-Known Member
Licensed User
Longtime User
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.

Play console error message:
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
Could it be related to this?
 
Upvote 0

andymc

Well-Known Member
Licensed User
Longtime User
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

DonManfred

Expert
Licensed User
Longtime User
It's complaining that it can't find the class anywheresoftware.b4a.objects.FirebaseNotificationsService
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.
Make sure to copy it into the internal library folder.

Start with fixing B first.
 
Upvote 0

andymc

Well-Known Member
Licensed User
Longtime User
Hi, yes it's 1.12
I still get the error. But the error goes away if I comment out the line:
B4X:
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

andymc

Well-Known Member
Licensed User
Longtime User
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:
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

DonManfred

Expert
Licensed User
Longtime User
But I'm only using firebaseadmob for showing ads and firebase analytics for posting events to firebase
your manifest should contain
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)

The line
B4X:
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:
 
Upvote 0
Top