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

Added Hyper-V Android Emulator Setup Instructions. Closes #3234 #5117

Closed
wants to merge 1 commit into from
Closed

Added Hyper-V Android Emulator Setup Instructions. Closes #3234 #5117

wants to merge 1 commit into from

Conversation

BerndWessels
Copy link
Contributor

These are the instructions to use a Hyper-V hardware accelerated Android emulator on Windows.

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @mkonicek, @sunnylqm and @kmagiera to be potential reviewers.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!


To use it with react-native you just have to add a key and value to your registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you wrap it in backticks? like

```
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
```

@satya164
Copy link
Contributor

satya164 commented Jan 4, 2016

Thanks for the PR. Let's fix these few thinsg before merging.

@mkonicek What about the assets? Where should we upload them?

@satya164 satya164 changed the title Added Hyper-V Android Emulator Setup Instructions Added Hyper-V Android Emulator Setup Instructions. Closes #3234 Jan 4, 2016
@facebook-github-bot
Copy link
Contributor

@BerndWessels updated the pull request.

@BerndWessels
Copy link
Contributor Author

@satya164 I've updated based on your feedback. Not sure if the screenshot is actually needed.

@astreet
Copy link
Contributor

astreet commented Jan 5, 2016

Thanks! Assets should be uploaded to {RN_REPO_ROOT}/website/src/react-native/img


A lot of developers, especially in the enterprise space are using Hyper-V on their machines. Unfortunately the default Android Emulator cannot be hardware accelerated if Hyper-V is turned on and turning it off is often not an option.

Fortunately there is a great and free android emulator that uses Hyper-V.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this line? We already say these things in the paragraph below.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

Thanks @astreet

@BerndWessels Can you add the image to the location @astreet suggested before we can merge ?

@facebook-github-bot
Copy link
Contributor

@BerndWessels updated the pull request.

@BerndWessels
Copy link
Contributor Author

@satya164 I removed the lines you mentioned and also the screenshot since the documentation now explains all the steps in detail.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

@BerndWessels Thanks. Looks good. Can you squash the commits to one before we merge?


The [Visual Studio Emulator for Android](https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx) is a free android emulator that is hardware accelerated via Hyper-V. It doesn't require you to install Visual Studio at all.

It is free, very powerful, fast and hardware accelerated via Hyper-V technology.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, missed this one. We basically say the same things in the previous paragraph. So remove this also.

@BerndWessels
Copy link
Contributor Author

@satya164 oops, how do I do that (the git squashing thing)?

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

@BerndWessels
Copy link
Contributor Author

@satya164 I hope the squashing worked, the text should be fine now and the screenshot is removed.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

@BerndWessels Nope. There are still 5 commits.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

Also, you didn't remove the line I mentioned. :(

@BerndWessels
Copy link
Contributor Author

@satya164 OK, so this should be the text, right? Or which line do you mean?

Windows Hyper-V Alternative

The Visual Studio Emulator for Android is a free android emulator that is hardware accelerated via Hyper-V. It doesn't require you to install Visual Studio at all.

To use it with react-native you just have to add a key and value to your registry:

  1. Open the Run Command (Windows+R)
  2. Enter regedit.exe
  3. In the Registry Editor navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
  4. Right Click on Android SDK Tools and choose New > String Value
  5. Set the name to Path
  6. Double Click the new Path Key and set the value to C:\Program Files\Android\sdk. The path value might be different on your machine.

You will also need to run the command adb reverse tcp:8081 tcp:8081 with this emulator.

Then restart the emulator and when it runs you can just do react-native run-android as usual.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

Yup.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

@facebook-github-bot
Copy link
Contributor

@BerndWessels updated the pull request.

@BerndWessels
Copy link
Contributor Author

@satya164 Sorry I doubt I get the commits squashed together since I made them in the master of my fork rather than in a branch - at least I can't find anyway to achieve that. If all this is too much trouble I can just create a new pull request or you make your own based on whats here. Sorry for the trouble - I sometimes struggle with Git.

@satya164
Copy link
Contributor

satya164 commented Jan 5, 2016

@BerndWessels No problem. Branch shouldn't make a difference.

You can alternatively run the following,

git reset --soft HEAD~6
git commit -m "Added Hyper-V Android Emulator Setup Instructions. Closes #3234"
git push -f

If it doesn't work. Feel free to send another PR and tag me.

@facebook-github-bot
Copy link
Contributor

@BerndWessels updated the pull request.

@BerndWessels
Copy link
Contributor Author

@satya164 ok, I did the git commands, now there is only one commit but I think there is other stuff in it now that does not belong to it.

@satya164
Copy link
Contributor

satya164 commented Jan 6, 2016

Ouch. Just do a new PR. Fixing is too much work. Sorry for the trouble.

@mkonicek
Copy link
Contributor

mkonicek commented Jan 6, 2016

Thanks for adding this!

@satya164
Copy link
Contributor

satya164 commented Jan 8, 2016

@BerndWessels Any updates on this?

@BerndWessels
Copy link
Contributor Author

@satya164 Hi, here is a new PR for this - we should close and abandon this one I guess.

@satya164 satya164 closed this Jan 10, 2016
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

Successfully merging this pull request may close these issues.

5 participants