A failure occurred while executing com.android.build.gradle.internal.tasks

后端 未结 19 4250
臣服心动
臣服心动 2020-12-04 23:27

I am getting this error while I am building APK.

Cause 1: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while          


        
相关标签:
19条回答
  • 2020-12-04 23:48

    I know this might not be a complete or exact solution, but for those who are still facing issues even after doing what is given on this thread, check for your files in value folder. For me there was a typo and some missing values. Once i fixed them this error stopped.

    0 讨论(0)
  • 2020-12-04 23:50

    I removed this issue by adding the following lines

    add multiDexEnabled true in android>app>build.gradle inside defaultConfig

    add implementation 'com.android.support:multidex:1.0.3' in android>app>build.gradle inside dependencies

    0 讨论(0)
  • 2020-12-04 23:51

    I got an stacktrace similar to yours only when building to Lollipop or Marshmallow, and the solution was to disable Advanved profiling.

    Find it here:

    Run -> Edit Configurations -> Profiling -> Enable advanced profiling

    https://stackoverflow.com/a/58029739/860488

    0 讨论(0)
  • 2020-12-04 23:55

    Finally found a solution for this by adding this line to gradle.properties.

    org.gradle.jvmargs=-Xmx4608m

    0 讨论(0)
  • 2020-12-04 23:57

    search your code you must be referring to color in color.xml in an xml drawable. go and give hex code instead of referencing....

    Example: in drawable.xml you must have called

    android:fillColor="@color/blue"
    

    change it to android:fillColor="#ffaacc" hope it solve your problem...

    0 讨论(0)
  • 2020-12-04 23:57

    In my case problem arose due to gradle version upgradation from 6.2 all to 6.6 all in gradle wrapper. So i wiped out data of avd and restarted it and then deleted .gradle folder in android/.gradle and then run yarn start --reset-cache and yarn android. Then it worked for me

    0 讨论(0)
提交回复
热议问题