在我将SDK从27更改为28,并更改了gradle中的某些依赖项以解决清单合并的问题后,我遇到了
的错误程序类型已存在:android.support.v4.app.INotificationSideChannel
这是我的build.gradle
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.facebook.fresco:fresco:1.10.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
implementation group: 'com.squareup.picasso', name: 'picasso', version: '2.5.2'
implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-perf:16.2.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.7'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.4'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'joda-time:joda-time:2.9.4'
implementation 'com.github.chrisbanes:PhotoView:2.3.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'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric'
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.0'
}
}
}
}
答案 0 :(得分:0)
我相信这是因为 com.google.firebase 暂时依赖于 com.android.support:support-v4 。为了解决这个问题,您应该可以在 gradle.properties 文件中设置 android.enableJetifier = true ,该文件将“自动转换现有的第三方库,就像编写它们一样适用于AndroidX”-https://developer.android.com/studio/preview/features/#androidx_refactoring。 希望会有所帮助!
答案 1 :(得分:0)
我终于找到了答案。问题在于以下依赖性
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
我将其更改为以下
implementation 'com.commit451:PhotoView:1.2.4'
它给了我所需的缩放属性