react-native: Could not install the app on the device, read the error above for details.
jax$ react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
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
jax$ adb devices
List of devices attached
192.168.56.101:5555 device
how can I fix it , On my computer . It’s ok for react-native run-ios and it’s ok for react-native run-android on my company computer
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 20
- Comments: 47
Commits related to this issue
- chmod 755 android/gradlew(https://github.com/facebook/react-native/issues/8868) — committed to wmzy/UniversalKey by deleted user 8 years ago
- Ajuste de permissão para compilar no OSX https://github.com/facebook/react-native/issues/8868 Signed-off-by: Nilton Kummer <niltonkummer@gmail.com> — committed to niltonkummer/rnbase by deleted user 6 years ago
@RainliFu you might check the permissions on
android/gradlew
they should be
755
not644
run
chmod 755 android/gradlew
inside your app root folder then runreact-native run-android
and it should work again.
how about windows i am getting the same error?
I’m running command as:
sudo react-native run-android
@cyprusglobe should this be put in documentation?
Thanks, it worked! good !
Basta modificar a permissão (
sudo chmod -R 777 android/grandlew
) da pastaandroid/grandlew
dentro da raiz do projeto, ou você pode rodar o comandosudo react-native run-android
…I finally figured out the problem and solved it.
@cyprusglobe Thanks for your help. This pit is good!
I tried “sudo react-native run-android” on my mac, working fine!
I was facing same issue, I fixed by running “npm install” Lol
On windows, this can be resolved by reinstalling
react-native-cli
npm uninstall -g react-native-cli
npm install -g react-native-cli
Restart powershell and Android Studio. You must start a new project and delete old ones.
react-native init NewProject
@eaintphyo ,can you share the experience! thanks!
@eaintphyo ,我想知道你是怎么解决的呀!?
if your android rom is MIUI ROM,find the solution: go settings -> developer option -> close MIUI optimization
Why there is still no solution for windows??
hi , when I wanna run project , I have this error , guide me plz: Scanning 556 folders for symlinks in C:\Users\sheyda\shidi\node_modules (63ms) Starting JS server… Building and installing the app on the device (cd android && gradlew.bat installDebug)…
Unzipping C:\Users\sheyda.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv\gradle-2.14.1-all.zip to C:\Users\sheyda.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv Exception in thread “main” java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:219) at java.util.zip.ZipFile.<init>(ZipFile.java:149) at java.util.zip.ZipFile.<init>(ZipFile.java:163) at org.gradle.wrapper.Install.unzip(Install.java:159) at org.gradle.wrapper.Install.access$500(Install.java:26) at org.gradle.wrapper.Install$1.call(Install.java:69) at org.gradle.wrapper.Install$1.call(Install.java:46) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:46) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) 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
It helped on windows: Run ‘react-native run-android’ via cmd as admin
@cyprusglobe thanks your advice.it’s useful
I have simillary issues but error message looks -```
@cyprusglobe Thanks for your help,I will try later! My company computer is ok .