DEV Community

loading...

Discussion on: react-native-maps done right for Android🕵️

Collapse
wibav profile image
Desh Bourne

can help me please?

Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'. > Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
Collapse
droidmakk profile image
Afroze Kabeer Khan. M Author

Can you share the gradle file

Collapse
wibav profile image
Desh Bourne

Android/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
//OLD
//classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.0.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "maven.google.com"
url "$rootDir/../node_modules/react-native/android"
}
}
}

ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 20
compileSdkVersion = 28
targetSdkVersion = 28
}

Android/gradle/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

Android/app/build.gradle

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation(project(':react-native-maps')) {
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
}

Thread Thread
wibav profile image
Desh Bourne

i solved my problem using this npm install — save “react-native-maps@jerolimov/react-native-maps#fix-rn59rc-compile-issues”

from: github.com/react-native-community/...

the problem is with React native 0.59+ that compile with compileSdkVersion 28 and maps use 26