Android Studio 3.6 & 更新后Gradle to 3.5.0 无法运行项目 [英] After update of Android Studio 3.6 & Gradle to 3.5.0 unable to run project

查看:38
本文介绍了Android Studio 3.6 & 更新后Gradle to 3.5.0 无法运行项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一切都很顺利,但在 Android Stdio 3.6 & 更新后Gradle 到 3.5.0,项目未构建,出现波纹管错误

Everything was working smoothly but after update of Android Stdio 3.6 & Gradle to 3.5.0, Project is not building, Getting bellow errors

 FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource compilation failed
     C:\Users\Amin\.gradle\caches\transforms-2\files-2.1\c1ea7b9f1e5ec36cfafa4328570d20ad\constraintlayout-2.0.0-beta2\res\values\values.xml:321:5-600: AAPT: error: duplicate value for resource 'attr/pivotX' with config ''.

     C:\Users\Amin\.gradle\caches\transforms-2\files-2.1\c1ea7b9f1e5ec36cfafa4328570d20ad\constraintlayout-2.0.0-beta2\res\values\values.xml:321:5-600: AAPT: error: resource previously defined here.

     C:\Users\Amin\.gradle\caches\transforms-2\files-2.1\c1ea7b9f1e5ec36cfafa4328570d20ad\constraintlayout-2.0.0-beta2\res\values\values.xml:321:5-600: AAPT: error: duplicate value for resource 'attr/pivotY' with config ''.

这里是 gradle.properties

Here is gradle.properties

org.gradle.jvmargs=-Xmx4608m
android.enableJetifier=true
android.useAndroidX=true

推荐答案

终于..我已经解决了问题..我观察到错误是在根据 logcat 的约束布局中,并观察到了 alpha 的约束布局版本我将版本降级为 implementation 'androidx.constraintlayout:constraintlayout:1.1.3'问题得到解决.

Finally.. I have solved the problem.. I observed error was in constraintlayout as per logcat and observed the constraintlayout version which was alpha I downgrade the version to implementation 'androidx.constraintlayout:constraintlayout:1.1.3' and the issue got fixed.

这篇关于Android Studio 3.6 & 更新后Gradle to 3.5.0 无法运行项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆