带有配置的资源“attr/tint”的重复值

Fra*_*con 3 android android-studio android-gradle-plugin

我没有构建可以成功构建的android项目。

构建:同步

../../../.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.0.aar/079f027781f9663d188d9dd5f4f897cd/res/values/values.xml
错误:资源'attr/的重复值用配置“着色”。错误:先前在此处定义的资源。

整个输出:

构建失败 6s 89ms 运行构建 5s 902ms 加载构建 27ms 配置构建 3s 955ms 计算任务图 31ms 运行任务 1s 871ms null
为以下翻译返回英文:
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt .v2.Aapt2Exception:AAPT2 错误:检查日志以获取详细信息
null
../../../.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.0.aar/079f027781f9663d188d9dd5f4f897 /values.xml
错误:资源 'attr/tint' 与配置 '' 的重复值。错误:先前在此处定义的资源。

这是我的依赖。

dependencies {
    implementation(name: 'appboy_release', ext: 'aar')
    testImplementation 'junit:junit:4.12'
    implementation project(':strings')
    implementation project(':osp-core')
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.facebook.android:facebook-android-sdk:4.18.0'
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support:gridlayout-v7:27.1.0'
    implementation 'com.android.support:preference-v7:27.1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.0'
    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.google.android.gms:play-services-analytics:12.0.1'
    implementation 'com.google.android.gms:play-services-gcm:12.0.1'
    implementation 'com.google.code.gson:gson:2.8.1'
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
    implementation 'com.sprylab.android.texturevideoview:texturevideoview:1.1.1'
    implementation 'com.makeramen:roundedimageview:2.2.1'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.3.0'
    implementation 'com.squareup.okhttp3:okhttp:3.7.0'
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.0.1'
    implementation 'com.squareup.okio:okio:1.12.0'
    implementation 'com.squareup:otto:1.3.3'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
    implementation 'com.squareup.retrofit2:retrofit:2.1.0'
    implementation 'com.squareup.sqlbrite:sqlbrite:0.6.3'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'io.reactivex:rxjava:1.2.5'
    implementation 'com.appsflyer:af-android-sdk:4.7.1@aar'
    implementation 'javax.annotation:jsr250-api:1.0'
    implementation 'com.github.chrisbanes.photoview:library:1.2.4'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    implementation('com.twitter.sdk.android:twitter:2.3.1@aar') {
        transitive = true
    }
    implementation project(':loading-widget')
    implementation files('libs/YouTubeAndroidPlayerApi.jar')
}
Run Code Online (Sandbox Code Playgroud)

当我将 Android Studio 更新到 3.1 并将 gradle 插件更新到 3.1.0 和 gradle 版本 4.4 时会发生这种情况 (distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip).

在我成功构建它之前。

任何帮助表示赞赏。

Yas*_*svi 5

对于仍然无法解决此问题的人:

在您的项目中搜索。你会喜欢:

<attr name="tint" format=...... /> (主要用于自定义视图)。

您必须重命名该属性名称,然后它应该会编译。