javascript – 评估MapboxGLManager.mapStyles

前端之家收集整理的这篇文章主要介绍了javascript – 评估MapboxGLManager.mapStyles前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试在我的React-Native应用程序上安装MapBox(找到 here)时,我一直收到此错误.

我的文件如下:

build.gradle

settings.gradle

MainActivity.java

AndroidManifest.xml

解决方法

在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')

猜你在找的JavaScript相关文章