Search Unity

Didn't find class "com.google.android.gms.common.GoogleApiAvailability"

Discussion in 'AR' started by TRS_ZueStra, Jan 8, 2020.

  1. TRS_ZueStra

    TRS_ZueStra

    Joined:
    Mar 6, 2019
    Posts:
    9
    Hi,

    I'm developing an AR application for Android devices. But the problem is, that I can't use the Image Tracking function. The image don't get recognized. Logcat shows following error that might be the reason:


    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager Exception during AuthenticationManager construction: com.google.android.gms.common.GoogleApiAvailability
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager java.lang.ClassNotFoundException: com.google.android.gms.common.GoogleApiAvailability
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at java.lang.Class.classForName(Native Method)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at java.lang.Class.forName(Class.java:453)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.google.ar.persistence.AuthenticationManager.a(PG:72)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.google.ar.persistence.AuthenticationManager.<init>(PG:4)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.google.ar.persistence.AuthenticationManagerFactory.create(PG:3)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at android.os.Handler.dispatchMessage(Handler.java:101)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at android.os.Looper.loop(Looper.java:164)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.GoogleApiAvailability" on path: DexPathList[[zip file "/data/app/com.xx.ar.x.test-XuyWkPSFwH_2bM4hLFRwRA==/base.apk"],nativeLibraryDirectories=[/data/app/com.xx.ar.x.test-XuyWkPSFwH_2bM4hLFRwRA==/lib/arm, /data/app/com.xx.ar.x.test-XuyWkPSFwH_2bM4hLFRwRA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    2020/01/08 16:11:59.976 25781 25822 Error ARCore-AuthenticationManager ... 11 more


    Does anybody have any ideas how to fix this problem? The error shows up as soon as the AR Session script is activated in Unity.

    I'm using:
    Unity 2019.3.0f3
    AR Foundation 3.1.0 - preview.3
    AR Subsystem 3.1.0 - preview.2
    ARCore XR Plugin 3.1.0 - preview.2
    XR Interaction Subsystems 1.0.1
    XR Interaction Toolkit 0.9.2 - preview
    XR Legal Input Helpers 1.3.8
    XR Management 3.05

    Device: Samsung Galaxy S8 with Android 8

    Thanks in advanced!
     
    Last edited: Jan 9, 2020
  2. sneharakhonde

    sneharakhonde

    Joined:
    Mar 1, 2019
    Posts:
    1
    Hi,

    I have resolved the issue
    Navigate to Assets-> plugins-> Android open the mainTemplete.gradle file in notepad and add dependency as implementation 'com.google.android.gms:play-services-auth:17.0.0' in gradle file under dependencies.
     
  3. Sabre-Runner

    Sabre-Runner

    Joined:
    Mar 28, 2013
    Posts:
    6
    I'm trying to create the simplest AR application and in my project, there is no Plugins directory. Am I missing something?