How to fix this error “A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade”

后端 未结 14 2020
死守一世寂寞
死守一世寂寞 2021-01-02 02:04

I can\'t run my app on AVD. I get this error.

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

14条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 02:41

    Make sure you have enough RAM for gradle process by updating org.gradle.jvmargs in your gradle.properties.

    Make sure your Gradle version and gradle plugin are compatible; refer to this table: https://developer.android.com/studio/releases/gradle-plugin#updating-gradle (i suggest plugin 3.5.3 with gradle 5.4.1 as of this writing!)

    And what might be happening to some without knowing it, is not using JDK 8! I tried with JDK 11 and saw many different R8 and dexing errors! Also looks like this whole setup does not work with Eclipse OpenJ9 JDK distribution! so make sure you are using standard OpenJDK of your OS (mine would be default OpenJDK-8 from Debian)

提交回复
热议问题