小编Ben*_*emp的帖子

无法将任务"包装器"添加为具有该名称的任务已存在

当安装'react-native init AwesomeProject'时,我在运行'react-native run-android'时遇到上述错误

Could not determine java version from '11.0.1'.
Run Code Online (Sandbox Code Playgroud)

一个快速的谷歌建议我需要更新Gradle-wrapper中的distributionUrl.这样做后,我面临一个新的错误

Cannot add task 'wrapper' as a task with that name already exists.
Run Code Online (Sandbox Code Playgroud)

它表明问题出在文件中:

/AwesomeProject/android/build.gradle' line: 36
Run Code Online (Sandbox Code Playgroud)

看起来像这样

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

我一直在试图弄清楚这是做什么的.奇怪的是,某些东西不能直接开箱即用.是否有人面临类似的问题?

android wrapper reactjs react-native expo

81
推荐指数
4
解决办法
4万
查看次数

标签 统计

android ×1

expo ×1

react-native ×1

reactjs ×1

wrapper ×1