解决方法
在build.gradle和settings.gradle中,您添加了错误的行:
的build.gradle
dependencies { compile project(':react-native-mapBox-gl') // <==== remove this line compile fileTree(dir: "libs",include: ["*.jar"]) compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" compile project(':reactnativemapBoxgl') // <=== missing this line }
settings.gradle
删除这两行……
include ':react-native-mapBox-gl' project(':react-native-mapBox-gl').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-mapBox-gl/android')
……并用以下内容替换它们:
include ':reactnativemapBoxgl' project(':reactnativemapBoxgl').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-mapBox-gl/android')