Estimote / react-native-proximity

React Native wrapper for Estimote Proximity SDK
Apache License 2.0
61 stars 38 forks source link

include documentation on buildToolsVersion not being compatible with current react-native init #13

Closed alaboudi closed 6 years ago

alaboudi commented 6 years ago

I am having difficulties trying to start my project with react-native-proximity because the documentation seems to be outdated with the current react-native init scaffold. Specifically, my issues are with sitting up the project with android. I receive the following error.

The SDK Build Tools revision (23.0.1) is too low for project ':@estimote_react-native-proximity'. Minimum required is 25.0.0

Just an FYI, below is the information in my top level build.gradle file that's straight from the react-native init.

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

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

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

allprojects {
    repositories {
        mavenLocal()
        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://maven.google.com/'
            name 'Google'
        }
    }
}

ext {
    buildToolsVersion = "26.0.3"
    minSdkVersion = 18
    compileSdkVersion = 26
    targetSdkVersion = 26
    supportLibVersion = "26.1.0"
}
heypiotr commented 6 years ago

Interesting, thanks for the heads-up! I see in the CHANGELOG that they indeed (finally) bumped the compile version.

The fix might possibly be as simple as bumping the numbers in the Estimote/react-native-proximity/android/build.gradle to what you've posted from the init:

ext {
    buildToolsVersion = "26.0.3"
    minSdkVersion = 18
    compileSdkVersion = 26
    targetSdkVersion = 26
    supportLibVersion = "26.1.0"
}

If you or someone else wants to give that a try and report back, that'd be much appreciated (: Otherwise, I'll take a look at it tomorrow or next week.

heypiotr commented 6 years ago

^ that worked, the Android plugin (v0.4.0) now uses the same compileSdkVersion, targetSdkVersion, and buildToolsVersion as the latest React Native, 0.56.

alaboudi commented 6 years ago

Thank you for upgrading the build.gradle file