Я получил следующую ошибку при работе на физическом Android 24 API:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/base/CharMatcher;
at com.google.common.base.Splitter.on(Splitter.java:125)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:203)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:84)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java:119)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:48)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:27)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:73)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(com.google.firebase:firebase-firestore@@21.1.1:92)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$new$0(com.google.firebase:firebase-firestore@@21.1.1:62)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.call(com.google.firebase:firebase-firestore@@21.1.1)
at com.google.android.gms.tasks.zzv.run(Unknown Source)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(com.google.firebase:firebase-firestore@@21.1.1:54)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor$$Lambda$1.run(com.google.firebase:firebase-firestore@@21.1.1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.common.base.CharMatcher" on path: DexPathList[[zip file "/data/app/com.byte_artisan.mchat2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.byte_artisan.mchat2-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.common.base.Splitter.on(Splitter.java:125)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:203)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:84)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java:119)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:48)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:27)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:73)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(com.google.firebase:firebase-firestore@@21.1.1:92)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$new$0(com.google.firebase:firebase-firestore@@21.1.1:62)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.call(com.google.firebase:firebase-firestore@@21.1.1)
at com.google.android.gms.tasks.zzv.run(Unknown Source)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(com.google.firebase:firebase-firestore@@21.1.1:54)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor$$Lambda$1.run(com.google.firebase:firebase-firestore@@21.1.1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Suppressed: java.lang.NoClassDefFoundError: com.google.common.base.CharMatcher
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:321)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 18 more
Suppressed: java.lang.ClassNotFoundException: com.google.common.base.CharMatcher
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Наблюдая за стеком, похоже, что ошибка происходит из-за инициализации firestore.
Ошибка начала всплыватьпосле недавних обновлений библиотек Firebase, не могу точно сказать, с какой из версий. Также приложение хорошо запускается в последних версиях Android.