android - 将依赖项升级到android中的最新版本后应用程序崩溃
问题描述
将我的项目升级到最新的依赖项后出现以下错误
在路径上找不到类“com.google.android.gms.common.util.zzq”:DexPathList [[zip 文件“/system/framework/org.apache.http.legacy.boot.jar”,zip 文件“ /data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/lib/x86, /system/库]]"
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'
推荐阅读
- antlr - 是否可以在 Antlr4 中将令牌拆分为 2?
- r - 删除具有特定行顺序的观察
- arrays - 如何更新数组中的 JSON 数据
- spring-kafka - 使用 RetryListener 获取 org.springframework.retry.TerminatedRetryException
- r - 将0,1列转换为逻辑的向量化方法?
- c++ - 如何在 C++ 中将参数从一个函数传递到另一个函数
- python - 如何在 raspbian 中使用 pyinstaller 和 opencv?
- c++11 - 为什么不调用移动构造函数?
- ios - 长按键盘时 TextField 显示 -[UIWindow endDisablingInterfaceAutorotationAnimated:] 错误 (SwiftUI)
- python - 在具有不同键的 2 个字典列表之间查找相同的值