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

Build failed on android. #201

Closed
zenato opened this issue Jul 14, 2018 · 9 comments
Closed

Build failed on android. #201

zenato opened this issue Jul 14, 2018 · 9 comments

Comments

@zenato
Copy link

zenato commented Jul 14, 2018

Hello,

react-native version: 0.56
react-native-pdf version: 3.0.16

I ran test app but an build error occurred.
Check the log below.

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

@vikas5914
Copy link
Contributor

@zenato you need to bump up the version SDK build Tool in the build.gradle file.

@zenato
Copy link
Author

zenato commented Jul 14, 2018

@vikas5914

My build.gradle

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

The cause of this problem seems to be this project build.gradle.
https://github.com/wonday/react-native-pdf/blob/master/android/build.gradle#L16

@vikas5914
Copy link
Contributor

make the targetSdkVersion 22

@zenato
Copy link
Author

zenato commented Jul 14, 2018

I used react native v0.56 default configuration.
Do I have to downgrade targetSdkVersion?
Do you have any plans to upgrade targetSdkVersion?

@vikas5914
Copy link
Contributor

sorry, can you try to lower the buildToolsVersion

@zenato
Copy link
Author

zenato commented Jul 14, 2018

@vikas5914 Hmm...

I can't downgrade SDK version.

See react native 0.56 release document.
https://github.com/facebook/react-native/releases

Android projects are now compiled using the Android 26 SDK.
The target API level is left unchanged in this release.

Starting August 2018, new apps submitted to the Play Store will need to target API 26 as a minimum. You can now opt your project in to use API 26 (or newer) as the target. Please let us know about any issues, as we'd like to finalize support for Android API 26 by the time 0.57.0 is released.

@vikas5914
Copy link
Contributor

try this: oblador/react-native-keychain#68

@wonday
Copy link
Owner

wonday commented Jul 16, 2018

I have updated android build tool to 26.0.3 at v3.0.17

@zenato
Copy link
Author

zenato commented Jul 16, 2018

@wonday Thank you for your upgrade.
I was able to solve the problem.

@zenato zenato closed this as completed Jul 16, 2018
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

3 participants