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

标签 android gradle android-gradle-plugin google-play-services android-multidex

将项目升级到最新的依赖项后出现以下错误

Didn't find class "com.google.android.gms.common.util.zzq" on path: 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来解决此问题。请帮忙。

最佳答案

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'

关于android - 将依赖项升级到android中的最新版本后,应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53282265/

相关文章:

android - 使用 picasso 的 GIF 图像动画

Android 在键盘插入时崩溃

java - 无法建立 ionic

gradle - 在 Android Studio 中调试失败的 Gradle 构建

android - Zygote 共享库处理

java - GridView 中列之间的图像间距

gradle - 我们如何运行插件的 Gradle 依赖关系报告?

gradle - 从外部目录执行gradle脚本

android - list 合并 - Android studio 0.8.1 升级构建错误 : property 'manifestFile' does not exist

gradle - 在前缀为 : mips64el-linux-android Flutter 的 ABI 的 NDK 工具链文件夹中找不到工具链