Skip to content

Commit 09b726c

Browse files
vchimevvchimev
vchimev
authored and
vchimev
committed
Update Android SDK Packages in macOS setup script
1 parent 94a3132 commit 09b726c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

setup/native-script.rb

+3-11
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,18 @@ def install_environment_variable(name, value)
134134
execute("echo y | #{android_executable} \"tools\"", error_msg)
135135
execute("echo y | #{android_executable} \"build-tools;25.0.2\"", error_msg)
136136
execute("echo y | #{android_executable} \"platforms;android-25\"", error_msg)
137-
execute("echo y | #{android_executable} \"platforms;android-24\"", error_msg)
138-
execute("echo y | #{android_executable} \"platforms;android-23\"", error_msg)
139-
execute("echo y | #{android_executable} \"platforms;android-22\"", error_msg)
140-
execute("echo y | #{android_executable} \"platforms;android-21\"", error_msg)
141-
execute("echo y | #{android_executable} \"platforms;android-19\"", error_msg)
142-
execute("echo y | #{android_executable} \"platforms;android-18\"", error_msg)
143-
execute("echo y | #{android_executable} \"platforms;android-17\"", error_msg)
137+
execute("echo y | #{android_executable} \"extras;android;m2repository\"", error_msg)
138+
execute("echo y | #{android_executable} \"extras;google;m2repository\"", error_msg)
144139

145140
puts "Do you want to install Android emulator? (y/n)"
146141
if gets.chomp.downcase == "y"
147142
puts "Do you want to install HAXM (Hardware accelerated Android emulator)? (y/n)"
148143
if gets.chomp.downcase == "y"
149144
execute("echo y | #{android_executable} \"extras;intel;Hardware_Accelerated_Execution_Manager\"", error_msg)
150-
151145
haxm_silent_installer = File.join(ENV["ANDROID_HOME"], "extras", "intel", "Hardware_Accelerated_Execution_Manager", "silent_install.sh")
152146
execute("sudo #{haxm_silent_installer}", "There seem to be some problems with the Android configuration")
153-
else
154147
end
155-
execute("echo y | #{android_executable} \"system-images;android-25;google_apis;x86\"", error_msg)
156-
execute("echo y | #{android_executable} \"system-images;android-24;default;x86\"", error_msg)
148+
execute("echo y | #{android_executable} \"system-images;android-25;google_apis;x86\"", error_msg)
157149
end
158150

159151
puts "The ANDROID_HOME and JAVA_HOME environment variables have been added to your .bash_profile/.zprofile"

0 commit comments

Comments
 (0)