Cannot add task 'wrapper' as a task with that name already exists

后端 未结 7 1962
忘掉有多难
忘掉有多难 2020-12-02 14:46

When installing \'react-native init AwesomeProject\' I get this error when I run react-native run-android:

Could not determine         


        
相关标签:
7条回答
  • 2020-12-02 15:46

    which version of gradle do you use in your environment?

    If you use gradle version 5.x you have to modify 「task wrapper」 as below.

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

    ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    wrapper {
        gradleVersion = '4.4'
        distributionUrl = distributionUrl.replace("bin", "all")
    }
    
    0 讨论(0)
提交回复
热议问题