将依赖项升级到android中的最新版本后,应用程序崩溃了

问题描述 投票:0回答:1

将项目升级到最新的依赖项后,我收到以下错误

在路径上找不到“com.google.android.gms.common.util.zzq”类:DexPathList [[zip file“/system/framework/org.apache.http.legacy.boot.jar”,zip file“ /data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/lib/x86,/ system / LIB]”

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.example"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        // Enabling multidex support.
        multiDexEnabled true

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding {
        enabled true
    }
//    buildToolsVersion '28.0.3'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:animated-vector-drawable:27.1.1'
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:support-v4: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:cardview-v7:27.1.1'

    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'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'org.jsoup:jsoup:1.10.3'

    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-places:16.0.0'

    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation 'com.google.firebase:firebase-core:16.0.5'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'

    implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
    implementation 'com.intuit.sdp:sdp-android:1.0.5'
    /*map place autosuggest*/
    //for calendar class
    implementation 'joda-time:joda-time:2.9.9'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    //QB dependecies
    implementation 'com.quickblox:quickblox-android-sdk-core:3.8.1'
    implementation('com.quickblox:quickblox-android-sdk-chat:3.8.0') {
        transitive = true
    }
    implementation 'com.quickblox:chat-message-adapter:2.0'
    implementation 'com.quickblox:quickblox-android-sdk-content:3.8.0'
    implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.2@aar'
    implementation 'com.github.orangegangsters:swipy:1.2.3@aar'
    implementation project(':sample-core')

//    implementation 'com.jwang123.flagkit:flagkit:1.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

//GoogleServicesPlugin.config.disableVersionCheck = true

任何人都可以指导我如何解决这个问题。我一直在搜索过去两天的stackoverflow来解决这个问题。请帮忙。

android gradle android-gradle google-play-services android-multidex
1个回答
4
投票
Ensure that your top-level build.gradle contains a reference to the google() repo or to maven { url "https://maven.google.com" }.

从build.gradle文件中删除它并再次同步

 apply plugin: 'com.google.gms.google-services'
© www.soinside.com 2019 - 2024. All rights reserved.