java.lang.ClassNotFoundException:com.google.android.gms.common.GoogleApiAvailability 尝试将 arcore 与 mediapipe 集成时发生

java.lang.ClassNotFoundException: com.google.android.gms.common.GoogleApiAvailability Occurs when try to integrate arcore with mediapipe

我正在努力集成 arcore 和 mediapipe application.But 当我尝试将 arcore 集成到 mediapipe 源代码中时,我遇到了一个会话对象问题,如下所示。

尝试创建 ARCore 的会话对象时遇到以下问题

    E/ARCore-AuthenticationManager: Exception during AuthenticationManager construction: 
    com.google.android.gms.common.GoogleApiAvailability
    java.lang.ClassNotFoundException: com.google.android.gms.common.GoogleApiAvailability
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:453)
    at com.google.ar.persistence.AuthenticationManager.a(PG:72)
    at com.google.ar.persistence.AuthenticationManager.(PG:4)
    at com.google.ar.persistence.AuthenticationManagerFactory.create(PG:3)
    at com.google.ar.core.Session.nativeCreateSessionAndWrapper(Native Method)
    at com.google.ar.core.Session.(Session.java:5)
    at com.example.handtrackinggradle.MainActivity.startCamera(MainActivity.java:324)
    at com.example.handtrackinggradle.MainActivity.onResume(MainActivity.java:171)
    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1416)
    at android.app.Activity.performResume(Activity.java:7609)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4013)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4053)
    at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState
    (TransactionExecutor.java: 145)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7076)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
    Caused by: java.lang.ClassNotFoundException: Didn't find class 
    "com.google.android.gms.common.GoogleApiAvailability" on path: DexPathList[[zip file 
    "/data/app/com.example.handtrackinggradle- 
    p0OQ0rOqD7I0DpvWKOl4_A==/base.apk"],nativeLibraryDirectories= 
    [/data/app/com.example.handtrackinggradle-p0OQ0rOqD7I0DpvWKOl4_A==/lib/arm64, 
    /data/app/com.example.handtrackinggradle-p0OQ0rOqD7I0DpvWKOl4_A==/base.apk!/lib/arm64- 
    v8a, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:1

我通过添加以下内容解决了这个问题 dependency.This 问题是由于依赖于以下依赖项的 AR Session 引起的

com.google.android.gms:play-services-auth:17.