Closed jwogan5 closed 6 years ago
Have you find a solution?
No, I just had to stick with 2.0.1 of the module.
If you haven't the necessity to use the resetAnalyticsData()
method, I create a PR https://github.com/hansemannn/titanium-firebase-analytics/pull/24/files in witch you can use the FirebaseAnalytics.enabled
property and it is compatible with the last firebase.core module.
In my github fork you can download a pre-release: https://github.com/Astrovic/titanium-firebase-analytics/releases/tag/android-2.1.1
Thank you for the build.
PR merged, thanks again @Astrovic !
Update: I was trying to use firebase analytics 2.1.0 which gave all of the precondition errors below. I switched the code to use firebase analytics 2.0.1 and everything worked as it should. So the latest release of the module is what is throwing all of the precondition errors.
I am trying to use the Firebase Analytics module with Android. With the same setup I am able to use the Firebase Cloud Messaging module for Android but when I try to include the analytics the app loads but hangs on startup with the error at the bottom. I have read through every other issue on both the core and analytics modules and my setup seems to be what everyone else has got to work. Any help with this issue would be greatly appreciated.
I am using : Alloy File :
Error:
W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; [WARN] W/System.err: at com.google.android.gms.internal.measurement.zzgl.zzg(Unknown Source) [WARN] W/System.err: at com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source) [WARN] W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:40) [WARN] W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.setScreenNameAndScreenClass(TitaniumFirebaseAnalyticsModule.java:74) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:187) [WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:247) [WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:134) [WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:189) [WARN] W/System.err: at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:171) [WARN] W/System.err: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:666) [WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:175) [WARN] W/System.err: at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:160) [WARN] W/System.err: at android.app.Activity.performCreate(Activity.java:6955) [WARN] W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) [WARN] W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927) [WARN] W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045) [WARN] W/System.err: at android.app.ActivityThread.-wrap14(ActivityThread.java) [WARN] W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642) [WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) [WARN] W/System.err: at android.os.Looper.loop(Looper.java:154) [WARN] W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6776) [WARN] W/System.err: at java.lang.reflect.Method.invoke(Native Method) [WARN] W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) [WARN] W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) [WARN] W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.comme rcial.imt2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.commercial.imt2-1/lib/arm64, /data/app/com.commercial.imt2-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] [WARN] W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) [WARN] W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:380) [WARN] W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) [WARN] W/System.err: ... 25 more [INFO] [LiveView] Error Evaluating app.js @ Line: undefined [ERROR] Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; [ERROR] File: app.js [ERROR] Line: undefined [ERROR] SourceId: undefined [ERROR] Backtrace: [ERROR] undefined
ERROR] FirebaseApp: Firebase API initialization failure. [ERROR] FirebaseApp: java.lang.reflect.InvocationTargetException [ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method) [ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.zza(Unknown Source) [ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) [ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) [ERROR] FirebaseApp: at firebase.core.TitaniumFirebaseCoreModule.configure(TitaniumFirebaseCoreModule.java:116)
[ERROR] FirebaseApp: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [ERROR] FirebaseApp: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:187) [ERROR] FirebaseApp: at org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:247) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:134) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:189) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:171) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:666) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:175) [ERROR] FirebaseApp: at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:160) [ERROR] FirebaseApp: at android.app.Activity.performCreate(Activity.java:6955) [ERROR] FirebaseApp: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) [ERROR] FirebaseApp: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927) [ERROR] FirebaseApp: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045) [ERROR] FirebaseApp: at android.app.ActivityThread.-wrap14(ActivityThread.java) [ERROR] FirebaseApp: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642) [ERROR] FirebaseApp: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] FirebaseApp: at android.os.Looper.loop(Looper.java:154) [ERROR] FirebaseApp: at android.app.ActivityThread.main(ActivityThread.java:6776) [ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method) [ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) [ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) [ERROR] FirebaseApp: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; [ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzgl.zzg(Unknown Source) [ERROR] FirebaseApp: at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source) [ERROR] FirebaseApp: ... 26 more [ERROR] FirebaseApp: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.commer cial.imt2-2/base.apk"],nativeLibraryDirectories=[/data/app/com.commercial.imt2-2/lib/arm64, /data/app/com.commercial.imt2-2/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] [ERROR] FirebaseApp: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) [ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:380) [ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) [ERROR] FirebaseApp: ... 28 more