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 can't build after upgrade gradle to 4.4 and tools.build:gradle to 3.1.0 #22196

Closed
WCChimiiz opened this issue Nov 7, 2018 · 6 comments
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@WCChimiiz
Copy link

Use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests. This helps us ensure bug reports and regressions are given the priority they require.

You may also use https://discuss.reactjs.org/ for discussions on topics that are not necessarily served by the Bug Report template.


For Discussion

I upgraded RN to 0.56 from 0.55.4, gradle to 4.4 from 3.5, build tools to 3.1.0 from 2.3.0

I run some thing to generate signed apk.
./gradlew clean assembleRelease

I got error.

BUILD SUCCESSFUL in 3m 24s
535 actionable tasks: 481 executed, 54 up-to-date
cp: android/app/build/outputs/apk/app-release.apk: No such file or directory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

but when I run react-native run-android it fine. I can start app.

@react-native-bot react-native-bot added Platform: Android Android applications. Type: Discussion Long running discussion. labels Nov 7, 2018
@radko93
Copy link
Contributor

radko93 commented Nov 7, 2018

@radko93 radko93 closed this as completed Nov 7, 2018
@WCChimiiz
Copy link
Author

Check out this MR https://github.com/react-native-community/react-native-releases/pull/60/files

I follow up form this link it not work for my case. It still error

BUILD SUCCESSFUL in 3m 31s
535 actionable tasks: 498 executed, 37 up-to-date
cp: android/app/build/outputs/apk/app-release.apk: No such file or directory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@radko93
Copy link
Contributor

radko93 commented Nov 8, 2018

I cannot help if you're not using latest version or publish some exact repro steps, sorry.

@radko93 radko93 added 📋No Repro Steps and removed Type: Discussion Long running discussion. labels Nov 8, 2018
@WCChimiiz
Copy link
Author

I cannot help if you're not using latest version or publish some exact repro steps, sorry.

Thank, now we try upgrade to 0.57.4

@WCChimiiz
Copy link
Author

@radko93 how to fix this

:react-native-maps:prepareReleaseDependencies
Conflict with dependency 'com.android.support:support-v4' in project ':react-native-maps'. Resolved versions for compilation (26.1.0) and packaging (24.0.0) differ. This can generate runtime errors due to mismatched resources.
:react-native-maps:prepareReleaseDependencies FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-maps:prepareReleaseDependencies'.
> Dependency Error. See console for details.

* 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: 40.629 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/getting-started.html
✨  Done in 60.02s.

now I try upgrade to 0.56 from 0.55.4 iOS it fine but can't run android

@radko93
Copy link
Contributor

radko93 commented Nov 15, 2018

Seems like react-native-maps have a different dependenc of com.android.support:support-v4. You should check react-native-maps gradle files and maybe ask there.

@facebook facebook locked as resolved and limited conversation to collaborators Nov 7, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants