I run the following:
$ adb reverse tcp:8081 tcp:8081 $ react-native run-android --configuration Release
And I get the following in response:
Release JS server already running.
Running adb -s HT68X0201778 reverse tcp:8081 tcp:8081
Generating the bundle for the release build... Unable to parse cache file. Will clear and continue. [01/07/2017, 19:52:45] Initializing Packager [01/07/2017, 19:52:45] Building Haste Map [01/07/2017, 19:52:47]
Building Haste Map (2085ms) [01/07/2017, 19:52:47]
Initializing Packager (2360ms) [01/07/2017, 19:52:47] Transforming files [01/07/2017, 19:52:48] Transforming files (1530ms)bundle: start bundle:
finish bundle: Writing bundle output
to: android/app/src/main/assets/index.android.bundle
ENOENT: no such file or directory, open 'android/app/src/main/assets/index.android.bundle'
I tried running it as sudo as well, with no luck.
UPDATE: I manually created the 'assets' folder inside of 'android/app/src/main/' and ran it again. This time it got further, but still failed with the following:
FAILURE: Build failed with an exception.
* What went wrong: Task 'installRelease' not found in root project 'AppVendor'. Some candidates are: 'uninstallRelease'.
./gradlew tasks. This should give you a list of all tasks available it might be that the installRelease tasks not exists or somehow the react-native cli command is running the glradle command from the wrong directory. you can run the same command directly with gradlew though. - tijs