React-native-device-info: android buildToolsVersion "25.0.2" is too high for us

Created on 27 Mar 2017  路  4Comments  路  Source: react-native-device-info/react-native-device-info

Can you reduce it's version to 23.0.1 ?
Thanks!

android

Most helpful comment

Please don't. Just fork the lib and drop it to your needs.

All 4 comments

hi...me need 23.0.1 too... thanx

Please don't. Just fork the lib and drop it to your needs.

You can do the following to force subprojects to compile with the build tools that you use.

In your build.gradle file, that lives inside the android directory, not the android/app directory, add the following.

android/build.gradle
ext {
    compileSdkVersion = 23
    buildToolsVersion = "23.0.1"
}
subprojects { subproject ->
    afterEvaluate{
        if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

Inside your android/app/build.gradle file, change compileSdkVersion and buildToolsVersion to the following

android/app/build.gradle
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

Closing this as we won't downgrade and a proper solution was provided.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pgonzalez-santiago picture pgonzalez-santiago  路  3Comments

dozel picture dozel  路  4Comments

truckhiem picture truckhiem  路  4Comments

ParryGao picture ParryGao  路  3Comments

lslvxy picture lslvxy  路  5Comments