当前位置: 首页 > 知识库问答 >
问题:

JAVAlang.NoSuchFieldError:没有Lcom/google/android/gms/internal/zzsb$zzb类型的静态字段KL

宋臻
2023-03-14

我正在尝试在Android上打开摄像头活动,但活动开始时出现以下错误:

FATAL EXCEPTION: main
  Process: bookreader.bookreader, PID: 19132
 java.lang.NoSuchFieldError: No static field KL of type Lcom/google/android/gms/internal/zzsb$zzb; in class Lcom/google/android/gms/internal/zzsb; or its superclasses (declaration of 'com.google.android.gms.internal.zzsb' appears in /data/app/bookreader.bookreader-1/split_lib_dependencies_apk.apk:classes4.dex)
at com.google.android.gms.vision.text.internal.client.zze.zzcic(Unknown Source)
at com.google.android.gms.vision.text.internal.client.zze.<init>(Unknown Source)
at com.google.android.gms.vision.text.TextRecognizer$Builder.build(Unknown Source)
at bookreader.bookreader.CameraActivity.onCreate(CameraActivity.java:97)
at android.app.Activity.performCreate(Activity.java:6609)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3113)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3275)
at android.app.ActivityThread.access$1000(ActivityThread.java:218)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:7007)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

我不知道怎么解决。在我的Android清单,我有这个:

 <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

共有1个答案

钱元徽
2023-03-14

确保构建中的所有内容都是最新的。格拉德尔

由于依赖项版本不匹配,通常不会发生此类方法/字段/类错误(不同版本的模糊字段名称可能不同)

 类似资料: