googleanalytics / google-analytics-plugin-for-unity

Google Analytics plugin for the Unity game creation system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracker fails to Initialize on Android

MHopke opened this issue · comments

Hi,

I'm using the new v4 SDK, and everything works on iOS, but on Android the Tracker seems to fail Initialization. I've tried looking at the other issues and they don't quite seem to be what I'm experiencing so I've posted a new issue, with my error below. If someone knows a solution please let me know! (and thank you!)

I/Unity ( 9702): Android notifications plugin loaded. Version: 1.4
I/Unity ( 9702):
I/Unity ( 9702): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity ( 9702):
I/Unity ( 9702): Initializing Google Analytics 0.2.
I/Unity ( 9702):
I/Unity ( 9702): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity ( 9702):
I/Unity ( 9702): Initializing Google Analytics Android Tracker.
I/Unity ( 9702):
I/Unity ( 9702): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity ( 9702):
I/Unity ( 9702): AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.analytics.GoogleAnalytics
I/Unity ( 9702): java.lang.ClassNotFoundException: com.google.android.gms.analytics.GoogleAnalytics
I/Unity ( 9702): at java.lang.Class.classForName(Native Method)
I/Unity ( 9702): at java.lang.Class.forName(Class.java:309)
I/Unity ( 9702): at java.lang.Class.forName(Class.java:273)
I/Unity ( 9702): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
I/Unity ( 9702): at com.unity3d.player.UnityPlayer.a(Unknown Source)
I/Unity ( 9702): at com.unity3d.player.UnityPlayer$b.run(Unknown Source)
I/Unity ( 9702): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.analytics.GoogleAnalytics" on path: DexPathList[[zip file "/data/app/com.fundacion.restaurant-1/base.apk"],nativeLibraryDirectories=[/data/app/com.fundacion.restaurant-1/lib/arm, /vendor/lib, /system/lib]]
I/Unity ( 9702): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
I/Unity ( 9702): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
I/Unity ( 9702): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
I/Unity ( 9702): ... 6 more
I/Unity ( 9702): Suppressed: java.lang.ClassNo

Just realized Closed issue #86 details how to fix this.