当我使用com.android.support.constraint:constraint-layout:2.0.0-beta2
我得到以下构建错误。
如果我使用com.android.support.constraint:constraint-layout:2.0.0-alpha2
,我不会收到任何错误。
为什么我会收到这些错误?如何摆脱这个?
我看到 app:alpha 在https://androidstudio.googleblog.com/2019/05/constraintlayout-200-beta-1.html中被重命名为 android:alpha
构建失败日志:
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:949: AAPT: Attribute "android:alpha" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: AAPT: Attribute "android:translationX" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: AAPT: Attribute "android:translationY" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: AAPT: Attribute "android:translationZ" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:949: error: Attribute "android:alpha" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: error: Attribute "android:translationX" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: error: Attribute "android:translationY" has already been defined
/home/user/MyApp/build/intermediates/res/merged/myFlavor/debug/values/values.xml:1017: error: Attribute "android:translationZ" has already been defined
:MyApp:processMyFlavorDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':MyApp:processMyFlavorDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt