react-native run-android failed
See original GitHub issueDescribe your environment
- React-Native version: 0.56.0
- Platform: Android
- Android Device & Simulator have same problem
- react-native-languages version: 2.0.1
- Android Studio version: 3.1.3
- Buildtools version 25.0.3 is installed
How to repeat issue and example
What I did?
- Install and link this library
- Implement the translation and get it works on iOS side running in simulator
- Now on Android, the build is failed with command
react-native run-android
Expected
- The build command not failed and be able to run on Android simulator
Actually happen
- The build is failed
What I try to fix?
- Change
compileSdkVersion, buildToolsVersion, and targetSdkVersion
inandroid/app/build.gradle
and run the commandreact-native run-android
but still gets the same error.
Solution
I think after change compileSdkVersion, buildToolsVersion, and targetSdkVersion
to match this library setup would fix the issue, but after change it stills fail. Maybe I need to somehow rebuild Android gradle? (Sorry, I’m not experience with Android).
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to Fix Build Failed on React-Native run-android?
You need to add ANDROID_HOME, JAVA_HOME variables in environmental variables and tools and platform-tools in path of system to run android apk.
Read more >Fails to run react-native run-android (v0.68.0) without yarn
Description when I create a test project and enable new architecture and Hermes it's giving me this type error below:- NOTE:- I KNOW...
Read more >React Native Android : FAILURE: Build failed with ... - A Shirazee
This is an issue with how Gradle is automating the build and the current version of the JDK installed on your machine, follow...
Read more >Addressing common errors in React Native - LogRocket Blog
Failed to install the app · Open your React Native application in a text editor like VS Code · In the application's root...
Read more >Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@zoontek - Upgraded to version 3.0.0 build on Android stills fail but with different error.
I try modify as @amfolio suggests, it fixes the error and be able to build successfully.
Got it to build by upgrading gradle.