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

GA4 Unity problem AndroidJavaException?

kkohno opened this issue · comments

I getting the following issue on android. Bug in plugin - I made an empty project Unity version 2018.2.2f1 to check this and get this issue, but on Editor is ok.

adb logcat:

AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
at com.google.android.gms.internal.measurement.zzat.zzc(Unknown Source)
at com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source)
at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
at android.os.MessageQueue.next(MessageQueue.java:392)
at android.os.Looper.loop(Looper.java:136)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.pixel.gun.combats-1/base.apk"],nativeLibraryDirectories=[/data/app/com.pixel.gun.combats-1/lib/arm, /data/app/com.pixel.gun.com

Did you find the problem? @kkohno

Same here- 2018.2.6
Seems issue is related to gradle.
Any resolve for this?

Eventually, I didn't use the SDK directly and used this plugin: https://assetstore.unity.com/packages/3d/characters/google-analytics-sdk-16317