Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: The SDK Build Tools revision (23.0.1) is too low for project ':react-native-social-share'. Minimum required is 25.0.0 #40

Closed
facuescobar opened this issue Jun 2, 2017 · 19 comments

Comments

@facuescobar
Copy link

facuescobar commented Jun 2, 2017

I am getting this error because of buildToolsVersion in this line:
https://github.com/doefler/react-native-social-share/blob/master/android/build.gradle#L5

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-social-share'.
      > The SDK Build Tools revision (23.0.1) is too low for project ':react-native-social-share'. 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.566 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-social-share": "^1.0.0",

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.

@doefler
Copy link
Owner

doefler commented Jun 2, 2017

Hey @Fackius

Thank you so much for this.
To be sure do you mean that you want me to change:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
...

into

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "25.0.0"
...

In this file
https://github.com/doefler/react-native-social-share/blob/master/android/build.gradle#L5
And that will fix the problem?

@buskerone @minhtule @Tigrakto @angusmccloud @eggybot have you experienced this error?

@facuescobar
Copy link
Author

facuescobar commented Jun 2, 2017

@doefler
thanks for the quick response!

yes, that's the right change.

I've fixed this error updating that line buildToolsVersion '25.0.0' in react-native-social-share/android/build.gradle.

This is how my file looks now:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 2
        versionName "1.1"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    lintOptions {
      warning 'InvalidPackage'
    }
}

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

@doefler
Copy link
Owner

doefler commented Jun 2, 2017

@Fackius You are welcome.
Do you think changing this could cause problems for other people, who uses a different version of the frameworks etc.?

@facuescobar
Copy link
Author

@doefler
I think I couldn't answer that.
I am using react-native-social-share in a new project, with latest version of react/react-native packages, sdk, etc.

So I think sooner or later you'll have to upgrade your settings to keep your library up to date.

If the developers who use this library has problem with latest settings and versions, then they will need to upgrade their projects :)

Hope that answer your question!

@doefler
Copy link
Owner

doefler commented Jun 2, 2017

@Fackius
That makes perfect sense.

@facuescobar
Copy link
Author

@doefler
let me know any update!

I referenced this issue in react-native-vector-icons because I've found the same issue there:
oblador/react-native-vector-icons#484

@facuescobar
Copy link
Author

Hi @doefler

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 ^
I think this issue can be closed.

Thanks for your time!
Cheers!

@doefler
Copy link
Owner

doefler commented Jun 2, 2017

@Fackius
Thank you for the update 👍
So I don't change the file and leave things as is, for now?

@doefler doefler closed this as completed Jun 2, 2017
@doefler
Copy link
Owner

doefler commented Jun 2, 2017

@Fackius btw if you want, feel free to connect on Linkedin

@fab-devtag
Copy link

In my case, i did not experience any issues with the build tool version yet.

I'll let you guys know if anything happen.

@doefler
Copy link
Owner

doefler commented Jun 3, 2017

@Tigrakto thanks for trying and getting back to us 👍
Have a nice weekend

@Jpadilla1
Copy link

Hey guys, I'm facing this error.

* 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-social-share'.
      > The SDK Build Tools revision (23.0.1) is too low for project ':react-native-social-share'. Minimum required is 25.0.0

React Native: 0.51.0
React Native Social Share: ^1.3.0

Had to update my buildToolsVersion to 25.0.0 and this is the only error I'm getting now.

@doefler
Copy link
Owner

doefler commented Dec 30, 2017

Hi @Jpadilla1
I am not sure what could be causing this.
Maybe one of the Android experts here can help you out.
CC @facuescobar

P.S.
Try updating React Native Social Share to 1.4.0

@Jpadilla1
Copy link

Jpadilla1 commented Jan 2, 2018

Tried updating to 1.4.0, same error message.

Edit: fixed it using this oblador/react-native-keychain#68 (comment)

@doefler
Copy link
Owner

doefler commented Jan 4, 2018

Thanks for sharing the solution @Jpadilla1 😄
Is there anything that could be changed in this repo to avoid the problem or should the solution you linked to be added to the getting started guide?

@Jpadilla1
Copy link

No problem! I honestly don't know if this is the best way to fix this and include it in the "getting started" guide. I don't think it's an issue with this library itself.

@doefler
Copy link
Owner

doefler commented Jan 5, 2018

Ok @Jpadilla1 😄
We will leave it as is for now 👍
If anyone reads this and thinks "Wished this was in the readme", please leave a comment 😆

@angusmccloud
Copy link

Does anyone know why this changed? I've been using SocialShare for a while with the setting at 23.0.1, but am now updating SocialShare (trying to get it working on iOS11) and curious why the Android side changed. Just curious if it's actually only going to work on Android 7+, since that's only ~25% of phones...

@wdayanand
Copy link

wdayanand commented Aug 3, 2018

No need to change in node-module
Just put these lines into project build.gradle make sure its not app build.gradle

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

it will force to all the submodules to use the specified compileSdkVersion(25) and buildToolsVersion(25.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants