Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Android Library SDK Versions
subprojects {
ext {
compileSdk = 25
buildTools = "25.0.1"
minSdk = 19
targetSdk = 25
}
afterEvaluate { project ->
if (!project.name.equalsIgnoreCase("app")
&& project.hasProperty("android")) {
android {
compileSdkVersion compileSdk
buildToolsVersion buildTools
defaultConfig {
minSdkVersion minSdk
targetSdkVersion targetSdk
}
}
}
}
}
@sesam
Copy link

sesam commented Jun 22, 2018

If you're using gradle 3.1.0 which might be needed to work around some other bugs, then update compileSdk to 27 and possibly also increase targetSdk

I added the code block from that gist at the end of android/build.gradle so the topmost or "root" build.gradle for the android version of the app.

This worked in my case:

    compileSdk = 27
    buildTools = "27.0.3"
    minSdk = 16
    targetSdk = 26

I had a dependency set for sdk 16, so had to set minSdk to 16 to avoid one warning about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment