Command failed: gradlew.bat installDebug

前端 未结 8 2105
太阳男子
太阳男子 2020-12-11 06:50

While developing an app I came into following error. I tried downgrading the java version from 11 to 8, but that wasn\'t helpful.

FAILURE: Build failed with          


        
相关标签:
8条回答
  • 2020-12-11 07:48

    I had this issue too and I was able to fix it by creating a new project in react-native 0.57.3 using the command: react-native init --version="0.57.3" MyNewApp

    0 讨论(0)
  • 2020-12-11 07:48

    You have to update the gradle-wrapper.properties file to use the newest version of gradle:

     distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
    

    And remove this block from build.gradle file:

    task wrapper(type: Wrapper) {
       gradleVersion = '5.2.1'
       distributionUrl = distributionUrl.replace("bin", "all")
    }
    

    Then run a gradlew clean on the android folder and everything should work.

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