Skip to content

Package not compatible with React Native 0.56 (Android) #730

Closed
@taranda

Description

@taranda

When attempting to include this package into a React Native 0.56 project, the following error occurs when running react-native run-android:

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

This is likely due to the fact that React Native 0.56 updates the buildTools version and targets API 26. Targeting API 26 is mandated for all new apps that wish to publish to Google Play.

In other words, unless this problem is fixed, new apps will not be able to use this package and publish to Google Play starting on 1 August.

Here is the relevant portions of the package.json for the app that generated this error:

"dependencies": {
    "react": "16.4.1",
    "react-native": "0.56.0",
    "react-native-config": "^0.11.5"
  }

I think PR #729 may fix this issue.

Activity

haixoay96

haixoay96 commented on Jul 19, 2018

@haixoay96

in build.gradle at android folder
subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}

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

taranda

taranda commented on Jul 19, 2018

@taranda
Author

@haixoay96 Nice workaround. I still hope we we can get #729 merged so this works “out of the box.”

RodolfoSilva

RodolfoSilva commented on Jul 19, 2018

@RodolfoSilva

Workaround, put it in android/build.gradle:

subprojects { subproject ->
    afterEvaluate {
        if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}
msand

msand commented on Oct 15, 2018

@msand
Contributor

v6.5.0 and up resolved this. Will close this now.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @msand@RodolfoSilva@taranda@haixoay96

        Issue actions

          Package not compatible with React Native 0.56 (Android) · Issue #730 · software-mansion/react-native-svg