-
Notifications
You must be signed in to change notification settings - Fork 74
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 failure on Android #27
Comments
Setting up with the same steps but using react-native 0.55 via rninit |
Hello @martnst. Thanks for reporting this issue! My apologies for the late response. I'm afraid I don't have the time to debug or fix this issue right now. But I suspect that it is caused by the I think this could be fixed by updating these values. Or, even better, not hardcoding those values, and instead relying on those defined in the parent project. PRs for this are welcomed :) In the meantime, you can add the following to your /**
* Force dependencies to use the same compileSdk and buildTools versions as the main project.
*
* Source: https://stackoverflow.com/a/25736483
*/
subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
I'm not a gradle expert, but I'm sure you could change this script to only target |
Hi @Hopding, okay fair enough. I actually ended up going a different way via some own native code turning HTML into PDF. If I remember right I kinda just wanted to report this FYI. |
Yes, this solution works. I am confirming after testing. |
@Hopding , that worked for me thanks |
I'll go ahead and close this issue as v1.0.0 should help here, and if not, this workaround should help too. If anyone knows of a better way we can tackle this please feel free to open a PR. |
I am encountering a build error on Android.
steps:
react-native init RNPDFPlay
cd RNPDFPlay
yarn add react-native-pdf-lib
dexOptions { jumboMode = true }
to./android/app/build.gradle
react-native run-android
build log:
env:
The text was updated successfully, but these errors were encountered: