hansemannn / titanium-firebase-analytics

Use the Firebase Analytics SDK in Axway Titanium 🚀
Other
35 stars 18 forks source link

Android: FirebaseCore.configure() error #23

Closed Astrovic closed 6 years ago

Astrovic commented 6 years ago

On Android there is something conflicting using the latest versions of firebase.analytics 2.1.0, firebase.core 2.2.0 and ti.playservice 11.8.0.

The app crash with this error:

[WARN]  W/System.err: java.lang.NoSuchMethodError: No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[WARN]  W/System.err:   at com.google.firebase.FirebaseOptions$Builder.setApiKey(Unknown Source)
[WARN]  W/System.err:   at firebase.core.TitaniumFirebaseCoreModule.configure(TitaniumFirebaseCoreModule.java:108)
[WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
[WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:55)
[WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:41)
[WARN]  W/System.err:   at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:166)
[WARN]  W/System.err:   at android.os.Handler.handleCallback(Handler.java:751)
[WARN]  W/System.err:   at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN]  W/System.err:   at android.os.Looper.loop(Looper.java:154)
[WARN]  W/System.err:   at android.app.ActivityThread.main(ActivityThread.java:6119)
[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:886)
[WARN]  W/System.err:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
[ERROR] TiExceptionHandler: (main) [285,5281] ----- Titanium Javascript Runtime Error -----
[ERROR] TiExceptionHandler: (main) [0,5281] - In /alloy/controllers/index.js:129,17
[ERROR] TiExceptionHandler: (main) [0,5281] - Message: Uncaught No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[ERROR] TiExceptionHandler: (main) [0,5281] - Source:           FirebaseCore.configure({
[ERROR] V8Exception: Exception occurred at /alloy/controllers/index.js:129: Uncaught No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[ERROR] V8Exception: No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)

I thought it was a problem of the firebase.core 2.2.0 module ( https://github.com/hansemannn/titanium-firebase-core/issues/19), but instead the problem does not occur if I use thefirebase.analytics 2.1.0 version.

hansemannn commented 6 years ago

PR merged, thanks @Astrovic !