2

您好,我尝试添加后我的依赖项有问题:

implementation 'com.google.android.gms:play-services-maps:15.0.1

我一直在寻找对我有帮助但没有任何运气的答案

我正在使用 Android Studio 3.2 BETA 4

错误

程序类型已存在:android.support.v4.media.MediaBrowserCompat$CustomActionCallback

项目构建gradle

buildscript {
    ext.kotlin_version = '1.2.51'
    ext.anko_version='0.10.5'
    repositories {
        mavenCentral()
        maven { url 'https://maven.google.com' }
        google()
        jcenter()


    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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: 'kotlin-kapt'



android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "appid"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"\


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

kapt {
    correctErrorTypes = true
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'


    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
    implementation 'com.jakewharton:butterknife:8.4.0'
    kapt 'com.jakewharton:butterknife-compiler:8.4.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0-beta01'
    //Anko
    implementation "org.jetbrains.anko:anko-commons:$anko_version"
    //Lifecycle
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-beta01'
    //annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0-beta01"
    kapt "androidx.lifecycle:lifecycle-compiler:2.0.0-beta01"
    //Room
    implementation 'androidx.room:room-runtime:2.0.0-beta01'
    //annotationProcessor "androidx.room:room-compiler:2.0.0-beta01"
    kapt "androidx.room:room-compiler:2.0.0-beta01"


}

渐变属性

org.gradle.jvmargs=-Xmx1536m
android.useAndroidX = true
android.enableJetifier = false

依赖树

+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.51
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.51
|         +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.51
|         \--- org.jetbrains:annotations:13.0
+--- androidx.constraintlayout:constraintlayout:1.1.2
|    \--- androidx.constraintlayout:constraintlayout-solver:1.1.2
+--- androidx.appcompat:appcompat:1.0.0-beta01
|    +--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.core:core:1.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.collection:collection:1.0.0-beta01
|    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0-beta01
|    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0-beta01
|    |    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    +--- androidx.arch.core:core-common:2.0.0-beta01
|    |    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.versionedparcelable:versionedparcelable:1.0.0-beta01
|    |         \--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.collection:collection:1.0.0-beta01 (*)
|    +--- androidx.cursoradapter:cursoradapter:1.0.0-beta01
|    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    +--- androidx.documentfile:documentfile:1.0.0-beta01
|    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.loader:loader:1.0.0-beta01
|    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-beta01
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0-beta01 (*)
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0-beta01 (*)
|    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0-beta01
|    |    |    |         +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |         \--- androidx.arch.core:core-common:2.0.0-beta01 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-beta01
|    |    |         \--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-beta01
|    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.print:print:1.0.0-beta01
|    |         \--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.fragment:fragment:1.0.0-beta01
|    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0-beta01
|    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01 (*)
|    |    |    +--- androidx.customview:customview:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    \--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    +--- androidx.viewpager:viewpager:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-beta01 (*)
|    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-beta01 (*)
|    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-beta01 (*)
|    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-beta01 (*)
|    |    |    +--- androidx.interpolator:interpolator:1.0.0-beta01
|    |    |    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    +--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    |    \--- androidx.interpolator:interpolator:1.0.0-beta01 (*)
|    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0-beta01
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    |    |    \--- androidx.core:core:1.0.0-beta01 (*)
|    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0-beta01 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01 (*)
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    +--- androidx.loader:loader:1.0.0-beta01 (*)
|    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-beta01 (*)
|    +--- androidx.vectordrawable:vectordrawable:1.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.core:core:1.0.0-beta01 (*)
|    \--- androidx.vectordrawable:vectordrawable-animated:1.0.0-beta01
|         +--- androidx.vectordrawable:vectordrawable:1.0.0-beta01 (*)
|         \--- androidx.legacy:legacy-support-core-ui:1.0.0-beta01 (*)
+--- androidx.legacy:legacy-support-v4:1.0.0-beta01
|    +--- androidx.core:core:1.0.0-beta01 (*)
|    +--- androidx.media:media:1.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.core:core:1.0.0-beta01 (*)
|    +--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01 (*)
|    +--- androidx.legacy:legacy-support-core-ui:1.0.0-beta01 (*)
|    \--- androidx.fragment:fragment:1.0.0-beta01 (*)
+--- com.google.android.material:material:1.0.0-beta01
|    +--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.core:core:1.0.0-beta01 (*)
|    +--- androidx.legacy:legacy-support-core-ui:1.0.0-beta01 (*)
|    +--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01 (*)
|    +--- androidx.fragment:fragment:1.0.0-beta01 (*)
|    +--- androidx.transition:transition:1.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.core:core:1.0.0-beta01 (*)
|    +--- androidx.appcompat:appcompat:1.0.0-beta01 (*)
|    +--- androidx.cardview:cardview:1.0.0-beta01
|    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    \--- androidx.recyclerview:recyclerview:1.0.0-beta01
|         +--- androidx.annotation:annotation:1.0.0-beta01
|         +--- androidx.core:core:1.0.0-beta01 (*)
|         \--- androidx.legacy:legacy-support-core-ui:1.0.0-beta01 (*)
+--- com.google.android.gms:play-services-maps:15.0.1
|    +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 15.0.1
|    |    +--- com.google.android.gms:play-services-basement:[15.0.1] -> 15.0.1
|    |    |    \--- com.android.support:support-v4:26.1.0
|    |    |         +--- com.android.support:support-compat:26.1.0
|    |    |         |    +--- com.android.support:support-annotations:26.1.0
|    |    |         |    \--- android.arch.lifecycle:runtime:1.0.0
|    |    |         |         +--- android.arch.lifecycle:common:1.0.0
|    |    |         |         \--- android.arch.core:common:1.0.0
|    |    |         +--- com.android.support:support-media-compat:26.1.0
|    |    |         |    +--- com.android.support:support-annotations:26.1.0
|    |    |         |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |         +--- com.android.support:support-core-utils:26.1.0
|    |    |         |    +--- com.android.support:support-annotations:26.1.0
|    |    |         |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |         +--- com.android.support:support-core-ui:26.1.0
|    |    |         |    +--- com.android.support:support-annotations:26.1.0
|    |    |         |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |         \--- com.android.support:support-fragment:26.1.0
|    |    |              +--- com.android.support:support-compat:26.1.0 (*)
|    |    |              +--- com.android.support:support-core-ui:26.1.0 (*)
|    |    |              \--- com.android.support:support-core-utils:26.1.0 (*)
|    |    \--- com.google.android.gms:play-services-tasks:[15.0.1] -> 15.0.1
|    |         \--- com.google.android.gms:play-services-basement:[15.0.1] -> 15.0.1 (*)
|    \--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 15.0.1 (*)
+--- com.jakewharton:butterknife:8.4.0
|    +--- com.jakewharton:butterknife-annotations:8.4.0
|    |    \--- com.android.support:support-annotations:24.1.0 -> 26.1.0
|    \--- com.android.support:support-annotations:24.1.0 -> 26.1.0
+--- androidx.recyclerview:recyclerview:1.0.0-beta01 (*)
+--- org.jetbrains.anko:anko-commons:0.10.5
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.1.0 -> 1.2.51 (*)
+--- androidx.lifecycle:lifecycle-extensions:2.0.0-beta01
|    +--- androidx.lifecycle:lifecycle-runtime:2.0.0-beta01 (*)
|    +--- androidx.arch.core:core-common:2.0.0-beta01 (*)
|    +--- androidx.arch.core:core-runtime:2.0.0-beta01 (*)
|    +--- androidx.fragment:fragment:1.0.0-beta01 (*)
|    +--- androidx.lifecycle:lifecycle-common:2.0.0-beta01 (*)
|    +--- androidx.lifecycle:lifecycle-livedata:2.0.0-beta01
|    |    +--- androidx.arch.core:core-runtime:2.0.0-beta01 (*)
|    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-beta01 (*)
|    |    \--- androidx.arch.core:core-common:2.0.0-beta01 (*)
|    +--- androidx.lifecycle:lifecycle-process:2.0.0-beta01
|    |    \--- androidx.lifecycle:lifecycle-runtime:2.0.0-beta01 (*)
|    +--- androidx.lifecycle:lifecycle-service:2.0.0-beta01
|    |    \--- androidx.lifecycle:lifecycle-runtime:2.0.0-beta01 (*)
|    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-beta01 (*)
+--- androidx.room:room-runtime:2.0.0-beta01
|    +--- androidx.room:room-common:2.0.0-beta01
|    |    \--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.sqlite:sqlite-framework:2.0.0-beta01
|    |    +--- androidx.annotation:annotation:1.0.0-beta01
|    |    \--- androidx.sqlite:sqlite:2.0.0-beta01
|    |         \--- androidx.annotation:annotation:1.0.0-beta01
|    +--- androidx.sqlite:sqlite:2.0.0-beta01 (*)
|    +--- androidx.arch.core:core-runtime:2.0.0-beta01 (*)
|    \--- androidx.legacy:legacy-support-core-utils:1.0.0-beta01 (*)
\--- junit:junit:4.12
     \--- org.hamcrest:hamcrest-core:1.3
4

0 回答 0