question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] "Build Failed" with no error; cannot run in Android emulator at all

See original GitHub issue

Using:

  • React Native v0.31.0
  • react-native-cli v1.0.0
  • Mac OSX El Capitan (10.11.6)
  • Android Studio v2.1.3
  • Android SDK API v23 (Marshmallow)

I’m trying to run the sample project https://github.com/mlaval/angular2-react-native-seed but as far as I can tell the issue is in the underlying react-native setup.

Building the iOS project & running the project in the xCode Simulator works like a charm; no problems whatsoever.

However, when attempting to build & run the Android project, I get:

Starting JS server...

Running /Users/narakasbergen/Library/Android/sdk/platform-tools/adb reverse tcp:8081 tcp:8081

Building and installing the app on the device (cd android && ./gradlew installDebug...



BUILD FAILED




Total time: 11.583 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/android-setup.html

The β€œread the error above for details” is frustrating because there’s no error details being output anywhere. 😦

The separate React Packager window has:

~/Code/angular2-react-native-seed/dist/ngRnSeed/node_modules/react-native/packager ~
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
 β”‚  Running packager on port 8081.                                            β”‚ 
 β”‚                                                                            β”‚ 
 β”‚  Keep this packager running while developing on any JS projects. Feel      β”‚ 
 β”‚  free to close this tab and run your own packager instance if you          β”‚ 
 β”‚  prefer.                                                                   β”‚ 
 β”‚                                                                            β”‚ 
 β”‚  https://github.com/facebook/react-native                                  β”‚ 
 β”‚                                                                            β”‚ 
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 
Looking for JS files in
   /Users/narakasbergen/Code/angular2-react-native-seed/dist/ngRnSeed 

[11:36:00 AM] <START> Building Dependency Graph
[11:36:00 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

[11:36:01 AM] <END>   Crawling File System (647ms)
[11:36:01 AM] <START> Building in-memory fs for JavaScript
[11:36:02 AM] <END>   Building in-memory fs for JavaScript (601ms)
[11:36:02 AM] <START> Building in-memory fs for Assets
[11:36:02 AM] <END>   Building in-memory fs for Assets (471ms)
[11:36:02 AM] <START> Building Haste Map
[11:36:02 AM] <START> Building (deprecated) Asset Map
[11:36:03 AM] <END>   Building (deprecated) Asset Map (184ms)
[11:36:03 AM] <END>   Building Haste Map (1147ms)
[11:36:03 AM] <END>   Building Dependency Graph (2905ms)

Again, no obvious errors here, so at this point I have no clues as to what’s wrong with my setup and cannot get this working in Android at all, which is annoying.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fenderrexcommented, Jan 27, 2017

well fu** no results 2 computers/os and i cant do the dam awsomeproject… i guess ill go back to farming

0reactions
Abdul-majid-ashraficommented, Apr 29, 2017

Hi, Now I am again facing this issue anybody help me to solve this problem, Thanks

Starting JS server…

Running /Users/narakasbergen/Library/Android/sdk/platform-tools/adb reverse tcp:8081 tcp:8081

Building and installing the app on the device (cd android && ./gradlew installDebug…

BUILD FAILED

Total time: 2.53 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/android-setup.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot known issues with Android Emulator
This page lists known issues, workarounds, and troubleshooting tips for the Android Emulator. If you encounter an issue not listed here orΒ ...
Read more >
Emulator in Android Studio doesn't start - Stack Overflow
1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
Read more >
[VS2019][Android Emulator]App always fails to deploy to the ...
A fix for this issue has been released! Please update your β€œAndroid Emulator” component to 29.2.11 or higher within the Android SDK Manager...
Read more >
Android Emulator Troubleshooting - .NET MAUI | Microsoft Learn
Make sure the Android Emulator is up to date. From Visual Studio, press Tools > Android > Android SDK Manager. Select the Tools...
Read more >
Troubleshooting: Cannot Run on an Android Device or Emulator
Manually uninstall the previously-installed application from your Android device. Β· Configure RAD Studio to perform a clean install every time that you run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found