我正在尝试将我的Android应用程序迁移到API 28 (Android 9/P)
我得到了5个我不能修复的错误,我仍然是Android开发的新手,我想,我可能没有最好的更新方法。
我已经尝试过清理和重建,但问题仍在发生。
这是我的gradle项目:
buildscript {
ext.kotlin_version = '1.2.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.realm:realm-gradle-plugin:5.4.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}下面是我的应用gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'
android {
lintOptions {
checkReleaseBuilds false
}
compileSdkVersion 28
defaultConfig {
applicationId "org.siku.siku"
minSdkVersion 21
targetSdkVersion 28
versionCode 118
versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true //important
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude module: 'support-annotations'
})
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0-rc01'
implementation 'androidx.core:core-ktx:1.0.0-rc01'
implementation 'androidx.exifinterface:exifinterface:1.0.0-rc01'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0-rc01'
implementation 'androidx.browser:browser:1.0.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.amitshekhar.android:android-networking:1.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'info.hoang8f:android-segmented:1.0.6'
implementation 'io.nlopez.smartlocation:library:3.3.3'
implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
implementation files('libs/CircleImageView-master/gradle/wrapper/gradle-wrapper.jar')
implementation 'org.greenrobot:eventbus:3.1.1'
testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation 'junit:junit:4.12'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
}
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
google()
}我收到5个错误:
1-程序类型已存在: android.support.customtabs.ICustomTabsCallback
2-由:合并dex存档时出现com.android.builder.dexing.DexArchiveMergerException:错误: java.lang.RuntimeException:
3-由:合并dex归档时出现com.android.builder.dexing.DexArchiveMergerException:错误:
4-原因: com.android.tools.r8.CompilationFailedException:编译无法完成
5-原因: com.android.tools.r8.utils.AbortException
我一直在努力寻找关于这个问题的文档。对文档的任何建议或链接都将不胜感激。
发布于 2018-08-27 21:07:12
也许您忘记了这一点:依赖项中的implementation 'com.android.support:multidex:1.0.3'
https://stackoverflow.com/questions/51940442
复制相似问题