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')
G. Hamaide
source share