-
-
Notifications
You must be signed in to change notification settings - Fork 197
Create Android default emulator #1794
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
Conversation
7f62073
to
62de8db
Compare
@@ -105,6 +105,13 @@ echo y | cmd /c "$androidExecutable" update sdk --filter "android-23" --all --no | |||
echo y | cmd /c "$androidExecutable" update sdk --filter "build-tools-23.0.2" --all --no-ui | |||
echo y | cmd /c "$androidExecutable" update sdk --filter "extra-android-m2repository" --all --no-ui | |||
|
|||
echo y | $ANDROID_HOME/tools/android update sdk --filter extra-intel-Hardware_Accelerated_Execution_Manager --all --no-ui | |||
|
|||
$haxmSilentInstaller = [io.path]::combine($env:ANDROID_HOME, "extras", "intel", "Hardware_Accelerated_Execution_Manager", "silent_install.sh") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it silent_install.bat
@@ -105,6 +105,20 @@ echo y | cmd /c "$androidExecutable" update sdk --filter "android-23" --all --no | |||
echo y | cmd /c "$androidExecutable" update sdk --filter "build-tools-23.0.2" --all --no-ui | |||
echo y | cmd /c "$androidExecutable" update sdk --filter "extra-android-m2repository" --all --no-ui | |||
|
|||
if ((Read-Host "Do you want to install Android emulator?") -eq 'y') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the Install
function here instead of asking the user explicitly.
The purpose of the Install
function is that the user may specify that that everything should be installed with no further questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've decided that we want to ask explicitly if Android emulator should be installed and what kind of emulator will be used. We don't want to install both emulators.
execute("echo y | #{android_executable} update sdk --filter android-23 --all --no-ui", "There seem to be some problems with the Android configuration") | ||
execute("echo y | #{android_executable} update sdk --filter build-tools-23.0.2 --all --no-ui", "There seem to be some problems with the Android configuration") | ||
execute("echo y | #{android_executable} update sdk --filter extra-android-m2repository --all --no-ui", "There seem to be some problems with the Android configuration") | ||
execute("echo y | #{android_executable} update sdk --filter platform-tools --all --no-ui", "#{error_msg}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can safely use the variable itself without expanding it inside a string
execute("echo y | #{android_executable} update sdk --filter platform-tools --all --no-ui", error_msg)
👍 |
1 similar comment
👍 |
execute("echo y | $ANDROID_HOME/tools/android update sdk --filter extra-intel-Hardware_Accelerated_Execution_Manager --all --no-ui", error_msg) | ||
|
||
haxm_silent_installer = File.join(ENV["ANDROID_HOME"], "extras", "intel", "Hardware_Accelerated_Execution_Manager", "silent_install.sh") | ||
execute("#{haxm_silent_installer}", "There seem to be some problems with the Android configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be re-written as:
execute(haxm_silent_installer, error_msg)
Related to #1731