Closed grigvardanyan closed 5 years ago
allprojects { repositories { configurations.all { resolutionStrategy { force "com.squareup.okhttp3:okhttp:3.9.1" } } mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" maven { url "https://jitpack.io" } maven { url "https://maven.google.com" } } } }
dependencies { implementation project(':mapbox_react-native-mapbox-gl'){ compile ('com.squareup.okhttp3:okhttp:3.6.0') { force = true } } implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" implementation "com.facebook.react:react-native:+" // From node_modules }
Works for me. Also, use master branch of this repo if you aren't already. (npm install --save nitaliano/react-native-mapbox-gl#master).
Thank you @anttijva
Your solution works for me.
Still have issue
@anttijva Could be there another reason of it?
Hi, @grigvardanyan!
Replace the react-native version on your package.json to 0.58.4:
"react-native": "0.58.4",
Delete android
and ios
folders and run on terminal:
$ react-native eject
$ react-native link
~Reconfigure the aplication!~ This is a bug with '@mapbox/react-native-mapbox-gl' and 'react-native' 0.59.x;
It's works for me! :)
@thiagodesouza thanks for suggestion I will try it today and will write result. And What do you mean reconfigure the app?
@grigvardanyan,
Sorry, Ignore...
The second command ($ react-native link
) already does the configuration. :)
@thiagodesouza after of your suggestion I also need do instruction of installing mapbox right?
@thiagodesouza Thanks a lot. It works )))
RN 59 support is now in master, closing ticket.
Hi all,
If anyone could help I'd be grateful, as I'm still seeing the issue:
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to
element at AndroidManifest.xml:7:5-117 to override.
Here is my package.json:
"@mapbox/react-native-mapbox-gl": "https://github.com/nitaliano/react-native-mapbox-gl/tarball/master",
"react-native": "0.59.9",
Here is the android > build.gradle :
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
....
allprojects {
repositories {
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
}
}
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
...
Here is my app > build.gradle
...
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation(project(':@mapbox_react-native-mapbox-gl')) {
implementation ('com.squareup.okhttp3:okhttp:3.12.3') {
force = true
}
}
...
Have tried to do `rm -rf node_modules/ && npm i" and start form clean but am still seeing the issue. Same thing on our CI tool. Help !!
Hi, I have issue . I am mapbox for android with from react native. I have added all necessary options(from Documentation) but still wasnt able to run. Please Could you help me?