0

我试图制作 GeoQueries 并找到了这个库。问题是我不能将它包含到我的项目中。它正在构建,但是当我尝试运行我的应用程序时它崩溃了。

这就是我的堆栈跟踪的样子:

java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev).
...
...
11-29 22:20:29.248 22249-22249/com.kzman.zuzumba E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.protobuf.ByteString" on path: DexPathList[[zip file "/data/app/com.kzman.zuzumba
    -v6RdgOpWgfSTYbJ1XGflOQS2f==/base.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_dependencies_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_resources_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_0_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_1_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_2_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_3_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_4_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_5_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_6_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_7_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_8_apk.apk", zip file "/data/app/com.kzman.zuzumba-v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.kzman.zuzumba-v6RdgOpWgfDSTYbJ1XGflOQ==/lib/arm64, /system/lib64, /system/vendor/lib64]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                ... 18 more
            Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/com.kzman.zuzumba
        -v6RdgOpWgfSTYbJ1XGflOQS2f==/split_lib_resources_apk.apk
            at dalvik.system.DexFile.openDexFileNative(Native Method)
            at dalvik.system.DexFile.openDexFile(DexFile.java:353)
            at dalvik.system.DexFile.<init>(DexFile.java:100)
            at dalvik.system.DexFile.<init>(DexFile.java:74)
            at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
            at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
            at dalvik.system.DexPathList.<init>(DexPathList.java:157)
            at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
            at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
            at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
            at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
            at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
            at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:676)
            at android.app.LoadedApk.getClassLoader(LoadedApk.java:709)
            at android.app.LoadedApk.getResources(LoadedApk.java:942)
            at android.app.ContextImpl.createAppContext(ContextImpl.java:2303)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5937)
            at android.app.ActivityThread.-wrap1(Unknown Source:0)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
            at android.os.Handler.dispatchMessage(Handler.java:105)
            at android.os.Looper.loop(Looper.java:164)
            at android.app.ActivityThread.main(ActivityThread.java:6938)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

我的构建看起来像这样

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.kzman.zuzumba"
        minSdkVersion 26
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-vector-drawable:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.google.firebase:firebase-core:16.0.5'
    implementation 'com.google.firebase:firebase-auth:16.0.5'
    implementation 'com.google.firebase:firebase-firestore:17.1.3'
    implementation 'com.google.firebase:firebase-storage:16.0.5'
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation "com.google.android.gms:play-services-location:16.0.0"
    implementation 'com.koalap:geofirestore-android:1.1.0'


    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:multidex:1.0.3'
}

apply plugin: 'com.google.gms.google-services'

有没有人有解决它的想法?它正在构建对我来说很奇怪但是当我尝试在我的 java 文件中没有任何使用代码的情况下运行它时它正在崩溃

4

1 回答 1

0

您可以尝试添加:

compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.6.1'
于 2018-11-29T22:18:08.080 回答