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

Correct way to update the plugin

Thornus opened this issue · comments

Hi everybody, I currently have GAv3 installed in one of my games. I tried deleting the GA plugin folder before installing GAv4 but when I open the game on Android (after installing the update) I get some exceptions.

`03-15 16:06:44.906: I/Unity(17009): AndroidJavaException:

java.lang.ClassNotFoundException:

com.google.android.gms.analytics.GoogleAnalytics
03-15 16:06:44.906: I/Unity(17009):

java.lang.ClassNotFoundException:

com.google.android.gms.analytics.GoogleAnalytics
03-15 16:06:44.906: I/Unity(17009): at

java.lang.Class.classForName(Native Method)
03-15 16:06:44.906: I/Unity(17009): at java.lang.Class.forName

(Class.java:251)
03-15 16:06:44.906: I/Unity(17009): at java.lang.Class.forName

(Class.java:216)
03-15 16:06:44.906: I/Unity(17009): Caused by:

java.lang.NoClassDefFoundError:

com/google/android/gms/analytics/GoogleAnalytics
03-15 16:06:44.906: I/Unity(17009): Caused by:

java.lang.ClassNotFoundException: Didn't find class

"com.google.android.gms.analytics.GoogleAnalytics" on path:

DexPathList[[zip file "/mnt/asec/com.app.game-

1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.app.game-

1/lib, /vendor/lib, /system/lib]]
03-15 16:06:45.286: I/Unity(17009): AndroidJavaException:

java.lang.ClassNotFoundException:

com.google.android.gms.analytics.GoogleAnalytics
03-15 16:06:45.286: I/Unity(17009):

java.lang.ClassNotFoundException:

com.google.android.gms.analytics.GoogleAnalytics
03-15 16:06:45.286: I/Unity(17009): at

java.lang.Class.classForName(Native Method)
03-15 16:06:45.286: I/Unity(17009): at java.lang.Class.forName

(Class.java:251)
03-15 16:06:45.286: I/Unity(17009): at java.lang.Class.forName

(Class.java:216)
03-15 16:06:45.286: I/Unity(17009): Caused by:

java.lang.NoClassDefFoundError:

com/google/android/gms/analytics/GoogleAnalytics
03-15 16:06:45.286: I/Unity(17009): Caused by:

java.lang.ClassNotFoundException: Didn't find class

"com.google.android.gms.analytics.GoogleAnalytics" on path:

DexPathList[[zip file "/mnt/asec/com.app.game-

1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.app.game-

1/lib, /vendor/lib, /system/lib]]
`

Same here..

I got it solved copying play-services-analytics-8.4.0.aar from {android-sdk}\extras\google\m2repository\com\google\android\gms\play-services-analytics\8.4.0 to Assets/Plugins/Android folder and after this I did what stated here (deleting 2 classes from libGoogleAnalyticsServices.jar).

It works. Thanks! Hope they fix this issue between unity analytics sdk and unity gps sdk.

I got it solved copying play-services-analytics-8.4.0.aar from {android-sdk}\extras\google\m2repository\com\google\android\gms\play-services-analytics\8.4.0 to Assets/Plugins/Android folder and after this I did what stated here (deleting 2 classes from libGoogleAnalyticsServices.jar).

This work me as well. Thanks!!!

Thank you so much for the solution. I am facing the same issue.

So we need to do both tasks? 1) Delete 2 classes from libGoogleAnalyticsServices.jar and 2) Replacing play-services-analytics-8.4.0.aar? or We just need to replace play-services-analytics-8.4.0.aar?

I got it solved just by copying play-services-analytics-9.6.1.aar and play-services-analytics-impl-9.6.1.aar from {android-sdk}\extras\google\m2repository\com\google\android\gms\play-services-analytics\9.6.1 to Assets/Plugins/Android

Thanks it works @mohammadqd

@mohammadqd thanks it works