React-native-vector-icons: The SDK Build Tools revision (23.0.1) is too low for project ':react-native-vector-icons'. Minimum required is 25.0.0

Created on 2 Jun 2017  路  3Comments  路  Source: oblador/react-native-vector-icons

I am getting this error because of buildToolsVersion in this line:
https://github.com/oblador/react-native-vector-icons/blob/master/android/build.gradle#L15

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-vector-icons'.
      > The SDK Build Tools revision (23.0.1) is too low for project ':react-native-vector-icons'. Minimum required is 25.0.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.998 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

Versions:

"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-vector-icons": "^4.1.1",

after upgrading buildToolsVersion to:

buildToolsVersion '25.0.0'

The error was fixed.

Should you guys update this in your repo?
This file is in node_modules, and everyone who npm install will get this error.

This is how my file looks now:

buildscript {
  repositories {
    jcenter()
  }

  dependencies {
    classpath 'com.android.tools.build:gradle:1.1.3'
  }
}

apply plugin: 'com.android.library'

android {
  compileSdkVersion 23
  buildToolsVersion "25.0.0"

  defaultConfig {
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
  }
  lintOptions {
    abortOnError false
  }
}

repositories {
  mavenCentral()
}

dependencies {
  compile "com.facebook.react:react-native:+"
}

Ps: if it helps, I've reported the same issue here https://github.com/doefler/react-native-social-share/issues/40

Most helpful comment

Adding the following code into root build.gradle file (NOT app/build.gradle) fixed it for me.

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 25
                buildToolsVersion '25.0.0'
            }
        }
    }
}

All 3 comments

Hi!

seems that this version issues were caused because something Android Studio did the first time I tried to build Android app.

I re builded the project from scratch in a different branch, without using Android Studio, and the build was successful.

If someone has the same problem, that's answer ^
Cheers.

Adding the following code into root build.gradle file (NOT app/build.gradle) fixed it for me.

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 25
                buildToolsVersion '25.0.0'
            }
        }
    }
}

@BigPun86 thanks, works for me!

Was this page helpful?
0 / 5 - 0 ratings