尝试在我的React-Native应用上安装Mapbox(找到here)时,我一直收到此错误消息。
我的文件如下:
答案 0 :(得分:0)
在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')