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

How to run against an Android Emulator for Quick test??? #2

Open
marcellodesales opened this issue Mar 16, 2017 · 0 comments
Open

How to run against an Android Emulator for Quick test??? #2

marcellodesales opened this issue Mar 16, 2017 · 0 comments

Comments

@marcellodesales
Copy link

marcellodesales commented Mar 16, 2017

Thanks for a more explained fork... Following your instructions, I'm getting the following error:

error: no devices/emulators found

This is when I run the instructions as is... Do I need to do anything else?

Create Project

$ ~/dev/github/public/MaximeD/docker-react-native/react-native.sh init MyAwesomeProjet
This will walk you through creating a new React Native project in /home/dev/app/MyAwesomeProjet
Installing react-native package from npm...

npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 8:58:34 PM
npm http request GET https://registry.npmjs.org/react-native
npm http 200 https://registry.npmjs.org/react-native
npm info retry fetch attempt 1 at 8:58:35 PM
npm info attempt registry request try #1 at 8:58:35 PM
npm http fetch GET https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
npm http fetch 200 https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
npm info install [email protected] into /home/dev/app/MyAwesomeProjet
npm info installOne [email protected]
npm info preinstall [email protected]
npm WARN peerDependencies The peer dependency react@~15.4.1 included from react-native will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/babel-core
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/babel-generator
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/
..
..
npm http fetch GET https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz
npm http 200 https://registry.npmjs.org/csurf
npm http 200 https://registry.npmjs.org/cookie
npm http 200 https://registry.npmjs.org/set-blocking
npm http 200
`npm install --save --save-exact react-native` failed

At this point, it failed with react-native installation... However, wouldn't the install still install more things?

Enter Container + Start adb with Failure

$ ~/dev/github/public/MaximeD/docker-react-native/react-native-container.sh
dev@oahu:~/app$ cd node_modules/react-native/
dev@oahu:~/app/node_modules/react-native$ yarn
yarn install v0.21.3
info No lockfile found.
[1/4] Resolving packages...
warning xcode > [email protected]: use uuid module instead
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 34.91s.

dev@oahu:~/app/node_modules/react-native$ adb reverse tcp:8081 tcp:8081
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
error: no devices/emulators found
dev@oahu:~/app/node_modules/react-native$ 

Can Create Emulators

http://stackoverflow.com/questions/4974568/how-do-i-launch-the-android-emulator-from-the-command-line/33487044#33487044

$ android avd

It did end with an error to enable 32bit ...

Gtk-Message: Failed to load module "canberra-gtk-module"
dev@oahu:~/app$ export ANDROID_EMULATOR_FORCE_32BIT=true

However, It couldn't because now it requires KVM

dev@oahu:~/app$ emulator -list-avds
AVD_for_Nexus_S_by_Google

dev@oahu:~/app$ emulator @AVD_for_Nexus_S_by_Google
emulator: WARNING: Increasing RAM size to 1GB
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm).

At this point, how can I run this Docker Image with an Emulator?

@marcellodesales marcellodesales changed the title "error: no devices/emulators found" after "adb reverse tcp:8081 tcp:8081" How to run against an Android Emulator for Quick test??? Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant