Skip to content

Commit f80953d

Browse files
authored
Fix JAVA_HOME and update Android SDK installation
1 parent d9192d0 commit f80953d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup/native-script.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def install(program_name, message, script, run_as_root = false, show_all_option
103103
end
104104

105105
unless ENV["JAVA_HOME"]
106-
execute('echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.profile', "Unable to set JAVA_HOME")
106+
execute('echo "export JAVA_HOME=$(/Library/Java/Home)" >> ~/.profile', "Unable to set JAVA_HOME")
107107
end
108108

109109
# the -p flag is set in order to ensure zero status code even if the directory exists
@@ -120,8 +120,10 @@ def install(program_name, message, script, run_as_root = false, show_all_option
120120
execute("echo y | #{android_executable} update sdk --filter platform-tools --all --no-ui", error_msg)
121121
execute("echo y | #{android_executable} update sdk --filter tools --all --no-ui", error_msg)
122122
execute("echo y | #{android_executable} update sdk --filter android-23 --all --no-ui", error_msg)
123+
execute("echo y | #{android_executable} update sdk --filter build-tools-24.0.2 --all --no-ui", error_msg)
123124
execute("echo y | #{android_executable} update sdk --filter build-tools-23.0.3 --all --no-ui", error_msg)
124125
execute("echo y | #{android_executable} update sdk --filter extra-android-m2repository --all --no-ui", error_msg)
126+
execute("echo y | #{android_executable} update sdk --filter extra-google-m2repository --all --no-ui", error_msg)
125127

126128
puts "Do you want to install Android emulator? (y/n)"
127129
if gets.chomp.downcase == "y"

0 commit comments

Comments
 (0)