Closed ghost closed 5 years ago
Please replace (build.gradle) will solved the issue (Please make sure build.gradle file of mapbox )
apply plugin: 'com.android.library'
android { compileSdkVersion 28 buildToolsVersion '28.0.3'
defaultConfig { minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0" }
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
// React Native compileOnly "com.facebook.react:react-native:+"
// Mapbox SDK implementation 'com.mapbox.mapboxsdk:mapbox-android-services:2.2.9'
// Fix issues implementation 'com.android.support:support-vector-drawable:28.0.0' implementation 'com.android.support:support-annotations:28.0.0' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.1@aar'
// Mapbox plugins implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization:0.1.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0' }
This is fixed in master branch, but not yet published to NPM. We got a ticket for publishing to NPM already. Please install from master in the interim. Closing.
Same here. I've tried replacing the module with the master branch but it didn't solved the problem.
I got this to work by installing from master and setting the RN project to EXACTLY buildToolsVersion = "28.0.0"
in the build.gradle file fyi
Please replace (build.gradle) will solved the issue (Please make sure build.gradle file of mapbox )
apply plugin: 'com.android.library'
android { compileSdkVersion 28 buildToolsVersion '28.0.3'
defaultConfig { minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0" }
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
// React Native compileOnly "com.facebook.react:react-native:+"
// Mapbox SDK implementation 'com.mapbox.mapboxsdk:mapbox-android-services:2.2.9'
// Fix issues implementation 'com.android.support:support-vector-drawable:28.0.0' implementation 'com.android.support:support-annotations:28.0.0' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.1@aar'
// Mapbox plugins implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization:0.1.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0' }
Is this on Master? I used yarn add https://github.com/nitaliano/react-native-mapbox-gl#master, but the app still crashes with the same error as @MrDatastorage . Any tips @kristfal @nitaliano ? Thanks
My env: "react-native": "0.59.1", "@mapbox/react-native-mapbox-gl": "^6.1.3",| Build Settings: buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 26 supportLibVersion = "28.0.0" All Project Settings in build.gradle allprojects { repositories { jcenter() google() maven { url "$rootDir/../node_modules/react-native/android" } maven { url "https://jitpack.io" } maven { url "https://maven.google.com" } } }
Build.gradle in app implementation project(':@mapbox_react-native-mapbox-gl')
Error: