Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After update of Android Studio 3.6 & Gradle to 3.5.0 unable to run project

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 ''.

Here is gradle.properties

org.gradle.jvmargs=-Xmx4608m
android.enableJetifier=true
android.useAndroidX=true
like image 565
Amin Pinjari Avatar asked Sep 09 '19 11:09

Amin Pinjari


Video Answer


2 Answers

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.

like image 66
Amin Pinjari Avatar answered Nov 09 '22 07:11

Amin Pinjari


Try changing in gradle.properties

org.gradle.jvmargs=-Xmx4096m
like image 26
Achintha Isuru Avatar answered Nov 09 '22 08:11

Achintha Isuru