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

Building and installing the app on the device (cd android && gradlew.bat installDebug): Could not install the app on the device, read the error above for details. #21437

Closed
mhannan opened this issue Oct 1, 2018 · 11 comments
Labels
Bug Platform: Android Android applications. Platform: Windows Building on Windows. Resolution: Locked This issue was locked by the bot.

Comments

@mhannan
Copy link

mhannan commented Oct 1, 2018

react-native** run-android command in Windows shows installation fail error.

Environment

OS: Windows 10
Node: 8.9.4
Yarn: Not Found
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5014246

Packages: (wanted => installed)

react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4

Description

I have seem number of similar issues, but all says to use chmod 755 but this does not work in Windows. I wonder how to resolve this error in my system. I have checked adb devices and it shows the emulator and also the mobile device when running or connected. Both have Developer setting enabled.

I am getting following error precisely:

C:\Node_React_Apps\my-app-v2>react-native run-android

Scanning folders for symlinks in C:\Node_React_Apps\news-app-v2\node_modules (66ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat 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/getting-started.html`

There is no such file in my my-app-v2/android/ directory as mentioned gradlew.bat, I also do not sure how to find any bug/log related to this issue which could help me to resolve the issue.

Some Background (if required)

I have detached my expo application, and only want to run it like this because I have integrated react-native-youtube library which requires detaching.

@react-native-bot react-native-bot added the Platform: Android Android applications. label Oct 1, 2018
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@codetycon
Copy link

There may be a permission issue if you are using Linux/Ubuntu
Change permission of android/gradlew to 755
Here is a command
runchmod 755 android/gradlewinside your app root folder

@farhanaslam5151
Copy link

i am using windows having same issue, can't run the chmod 755 android/gradlew command any solution

@bishalgnyawali
Copy link

thank you it worked for me in mac

@SourceCipher
Copy link

There is still an issue.. I encounter this every time I run npm audit fix.. After npm install I dont have this issue but as soon as I run npm audit fix it breaks

@thymikee thymikee added the Platform: Windows Building on Windows. label Mar 19, 2019
@thymikee
Copy link
Contributor

Anybody on Windows can reproduce this on latest React Native version (0.59.1)? npm audit fix changing permissions is clearly an npm bug.

Closing for now, but happy to reopen if this is still a problem.

@echpee
Copy link

echpee commented Mar 23, 2019

So many people getting the error again which means they didn't consider the "app-root folder" .

@usamamashkoor
Copy link

I am facing the same issue in windows 10 react native.

@jonthemango
Copy link

Have this issue on windows still. Anyone have a solution?

react-native-cli: 2.0.1
react-native: 0.59.9
npm: 6.9.0
Windows 10 Home

@Prabukmca
Copy link

You have to install Git in Windows, from GitBash command prompt, you can run that command.

@sudiptaExicube

This comment has been minimized.

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

No branches or pull requests