Execution failed for task ‘:app:processDebugResources‘.
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Attribute "android:translationX" has already been defined
Attribute "android:translationY" has already been defined
Attribute "android:translationZ" has already been defined
说是属性已经定义,重复定义了。
一般就是build.gradle文件的问题了。毕竟translationX等属性我并没有自定义,那就是你导入的官方的第三方控件引起冲突,与自身项目的compileSdkVersion 和buildToolsVersion 不匹配,查看是不是某个引入的控件太高或太低版本,导致不兼容
如:
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
而我的
compileSdkVersion 28
buildToolsVersion '28.0.3'
显然,版本并不匹配,可能是因为implementation 'androidx.constraintlayout:constraintlayout:2.0.4'。需要升级为androidx,能与之匹配的gradle版本。或者降控件版本
本文地址:https://blog.csdn.net/qq_31622345/article/details/111925130
上一篇: 打骂
下一篇: Python 二分法(bisect模块)
推荐阅读
-
Execution failed for task ':app:preDebugAndroidTestBuild问题解决
-
ANDROID打包错误ERROR:EXECUTION FAILED FOR TASK ′:APP:LINTVITALRELEASE′.
-
关于android studio打开后自动弹出:Error:Execution failed for task ':app:preDebugAndroidTestBuild'
-
Error:Execution failed for task ':app:processDebugManifest'.
-
异常Error:Execution failed for task ':app:preDebugAndroidTestBuild'解决方法
-
Android Studio NDK开发时报Execution failed for task ':xxxx项目:transformNativeLibsWithStripDebugSymbol 错误的解决办法
-
Execution failed for task ‘:app:checkDebugDuplicateClasses‘解决方案
-
Error:Execution failed for task ':app:kaptDebugKotlin'
-
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
-
有效解决Execution failed for task ':app:clean'. > Unable to delete directory问题