MapboxGLManager.mapStyles Score

I keep getting this error while trying to install Mapbox (found here ) in my React-Native app. Mistake

My files are as follows:

build.gradle

settings.gradle

MainActivity.java

AndroidManifest.xml

+7
javascript android reactjs react-native mapbox
source share
1 answer

In your build.gradle and settings.gradle file, you added the wrong lines:

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

Delete these two lines ...

 include ':react-native-mapbox-gl' project(':react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mapbox-gl/android') 

... and replace them with the following:

 include ':reactnativemapboxgl' project(':reactnativemapboxgl').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mapbox-gl/android') 
0
source share

All Articles