Android Question Crashlytics error

fishwolf

Well-Known Member
Licensed User
Longtime User
I have a project that already implemented firebase for admob and messages

i have follow the istruction for add crashlytics

1) Add Jar in main
2) Add Macro in manifest
3) Add library firebase crashlutics from SDK manager

when run the app crash immediately

B4X:
09-30 09:25:08.159 14516 14516 I FirebaseCrashlytics: Initializing Crashlytics 17.2.1
09-30 09:25:08.170 14516 14516 D AndroidRuntime: Shutting down VM
09-30 09:25:08.170 14516 14516 E AndroidRuntime: FATAL EXCEPTION: main
09-30 09:25:08.170 14516 14516 E AndroidRuntime: Process: MY-APP, PID: 14516
09-30 09:25:08.170 14516 14516 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method ignoreNullValues(Z)Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder; in class Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder; or its super classes (declaration of 'com.google.firebase.encoders.json.JsonDataEncoderBuilder' appears in /data/app/MY-APP-1/base.apk)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.internal.model.serialization.CrashlyticsReportJsonTransform.<clinit>(CrashlyticsReportJsonTransform.java:37)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.internal.persistence.CrashlyticsReportPersistence.<clinit>(CrashlyticsReportPersistence.java:70)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.create(SessionReportingCoordinator.java:63)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.internal.common.CrashlyticsController.<init>(CrashlyticsController.java:331)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.internal.common.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:142)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.FirebaseCrashlytics.init(FirebaseCrashlytics.java:165)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.CrashlyticsRegistrar.buildCrashlytics(CrashlyticsRegistrar.java:54)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.CrashlyticsRegistrar.access$lambda$0(CrashlyticsRegistrar.java)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.crashlytics.CrashlyticsRegistrar$$Lambda$1.create(CrashlyticsRegistrar.java)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.components.ComponentRuntime.lambda$new$0(com.google.firebase:firebase-components@@16.0.0:69)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(com.google.firebase:firebase-components@@16.0.0)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.components.Lazy.get(com.google.firebase:firebase-components@@16.0.0:53)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(com.google.firebase:firebase-components@@16.0.0:158)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@19.3.0:563)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:304)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:268)
09-30 09:25:08.170 14516 14516 E AndroidRuntime:     at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:253)
 

fishwolf

Well-Known Member
Licensed User
Longtime User
attach example project

i don't understand the problem
 

Attachments

  • DevTest.zip
    9.9 KB · Views: 164
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
(...)but the main app, the console is already blocked.
(...)is it normal that google-service.json is different today from last download?
- The crashlytics in main app is new or you use it with the old version of crashlytics before?
Check if there is no read only files in the /res/values folder.

- Download the google-service.json again, check if there are changes between the old and new files. If there are changes, uses the new.
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
I have download google-service.json now
i have used new file in test app with the name of main app
firebase console is active now
but when i use the main app + new file the error is not showed on console
this project is very old, about 5 years, created with b4x very old, can be this the problem?
can be some libreries used?
1602682414733.png
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I use several of this libs in my project, without problems.
My problem with old projects and the new crashlytics (I think, because need more investigation) is because the "googleservices.xml" and "com_crashlytics_build_id.xml" was marked with ready only and is not update to use the new functions.
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
I use several of this libs in my project, without problems.
My problem with old projects and the new crashlytics (I think, because need more investigation) is because the "googleservices.xml" and "com_crashlytics_build_id.xml" was marked with ready only and is not update to use the new functions.
I have removed check "read-only" from project folder (with all files) but the app doesn't work fine
B4X:
functions_createactionbar (java line: 256)
android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:202)
    at android.content.res.Resources.getDimension(Resources.java:1466)
    at de.amberhome.SimpleActionBar.ActionBar.<init>(ActionBar.java:312)
    at de.amberhome.SimpleActionBar.ActionBarWrapper.innerInitialize(ActionBarWrapper.java:86)
    at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:67)
    at de.amberhome.SimpleActionBar.ActionBarWrapper.Initialize2(ActionBarWrapper.java:79)
    at de.amberhome.SimpleActionBar.ActionBarWrapper.Initialize(ActionBarWrapper.java:63)
    at it.software.castiel.infoagility.functions._createactionbar(functions.java:256)
    at it.software.castiel.infoagility.main._timersplash_tick(main.java:1056)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6682)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
android.content.res.Resources$NotFoundException: Resource ID #0x0
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I have removed check "read-only" from project folder (with all files) but the app doesn't work fine
Only remove "googleservices.xml" and "com_crashlytics_build_id.xml" if they exists and marked the folder (/res/values) with read-only again.

This files will recreated with the new options and remarked with read-only.

You can marked with read-only only the files that you use with "functions_createactionbar".
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
Only remove "googleservices.xml" and "com_crashlytics_build_id.xml" if they exists and marked the folder (/res/values) with read-only again.

This files will recreated with the new options and remarked with read-only.

You can marked with read-only only the files that you use with "functions_createactionbar".
done , but errors aren't showed on console
 
Upvote 0
Top