Skip to content

Commit 453fb44

Browse files
author
PROGRESS\radeva
committed
refactor: explicitly accept android sdk licenses
Remove auto-accept of licenses with `echo y` since when android sdk is installed for the first time it requires to accept multiple licenses which breaks due to the `echo` and as a result the tools are not updated. Instead leave the user to explicitly accept all the licenses
1 parent d67aba8 commit 453fb44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

native-script.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ if($androidToolsPath){
130130
if($androidToolsPathExists -eq $True){
131131
Write-Host -ForegroundColor DarkYellow "Updating Android SDK tools..."
132132
Copy-Item "$androidToolsPath" "$androidToolsOldPath" -recurse
133-
echo y | cmd /c "%ANDROID_HOME%\toolsOld\bin\sdkmanager.bat" "tools" --licenses
133+
# Do NOT auto-accept license with `echo y` since the command requires acceptance of MULTIPLE licenses on a clean machine which breaks in this case
134+
cmd /c "%ANDROID_HOME%\toolsOld\bin\sdkmanager.bat" "tools"
134135
Remove-Item "$androidToolsOldPath" -Force -Recurse
135136
} else {
136137
Write-Host -ForegroundColor Red "ERROR: Failed to update Android SDK tools. This is a blocker to install default emulator, so please update manually once this installation has finished."

0 commit comments

Comments
 (0)