Closed hamid closed 5 years ago
According to this issue the problem is related to gradle that mapir-react-native-sdk
works only in gradle:3.2.1.
to fix change _node_modules/mapir-mapbox/android/rctmgl/build.gradle
_ and add the following line to its dependencies
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'
in fact the rctmgl/build.gradle
is :
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'
implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.2@aar') {
transitive=true
}
// 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'
// Mapbox plugins
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization:0.1.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0'
}
thanks for your attention! Our sdk is based on mapbox-react-native-mapbox-gl that use react-native<=57 and so on! Upgrade is in progress!
Hi. I do the installation step by step in android but in the android studio I 'v got the following error: