【发布时间】:2018-04-02 08:29:21
【问题描述】:
我的android项目构建失败,可以构建成功。
构建:同步
../../../.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.0.aar/079f027781f9663d188d9dd5f4f897cd/res/values/values.xml
错误:资源“attr/tint”与配置“”的重复值。 错误:之前在这里定义的资源。
整个输出:
构建失败 6s 89ms 运行构建 5s 902ms 加载构建 27ms 配置构建 3s 955ms 计算任务图 31ms 运行任务 1s 871ms 空
为以下翻译返回英文:
java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.v2.Aapt2Exception:AAPT2 错误:查看日志了解详细信息
空
../../../.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.0.aar/079f027781f9663d188d9dd5f4f897cd/res/values/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')
}
当我将 Android studio 更新到 3.1 并将 gradle 插件更新到 3.1.0 和 gradle 版本 4.4 (distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip).
在我成功构建之前。
感谢任何帮助。
【问题讨论】:
-
您在构建之前尝试过清理吗?
-
使用multidexenable
-
@ReazMurshed 是的,我试过了,但还是失败了。
-
@AbhinavGupta 不幸的是它正在设置中。
-
删除整个 *build 文件夹(在 *app 文件夹下)并再次清理+重建项目。
标签: android android-studio android-gradle-plugin