@@ -59,16 +59,8 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
5959 core . addPath ( `${ cmdlineToolsPath } /latest:${ cmdlineToolsPath } /latest/bin:${ process . env . ANDROID_SDK_ROOT } /platform-tools` ) ;
6060 // set standard AVD path
6161 core . exportVariable ( 'ANDROID_AVD_HOME' , `${ process . env . HOME } /.android/avd` ) ;
62- // additional permission and license requirements for Linux
63- const sdkPreviewLicensePath = `${ process . env . ANDROID_SDK_ROOT } /licenses/android-sdk-preview-license` ;
64- if ( ! isOnMac && ! fs . existsSync ( sdkPreviewLicensePath ) ) {
65- fs . writeFileSync ( sdkPreviewLicensePath , '\n84831b9409646a918e30573bab4c9c91346d8abd' ) ;
66- }
67- // license required for API 30 and non-default API 28 system images
68- const sdkArmDbtLicensePath = `${ process . env . ANDROID_SDK_ROOT } /licenses/android-sdk-arm-dbt-license` ;
69- if ( requiresArmDbtLicense ( apiLevel , target ) && ! fs . existsSync ( sdkArmDbtLicensePath ) ) {
70- fs . writeFileSync ( sdkArmDbtLicensePath , '\n859f317696f67ef3d7f30a50a5560e7834b43903' ) ;
71- }
62+ // accept all Android SDK licenses
63+ yield exec . exec ( `sh -c \\"yes | sdkmanager --licenses > /dev/null"` ) ;
7264 console . log ( 'Installing latest build tools, platform tools, and platform.' ) ;
7365 yield exec . exec ( `sh -c \\"sdkmanager --install 'build-tools;${ BUILD_TOOLS_VERSION } ' platform-tools 'platforms;android-${ apiLevel } ' > /dev/null"` ) ;
7466 console . log ( 'Installing latest emulator.' ) ;
@@ -94,6 +86,3 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
9486 } ) ;
9587}
9688exports . installAndroidSdk = installAndroidSdk ;
97- function requiresArmDbtLicense ( apiLevel , target ) {
98- return apiLevel === 30 || ( apiLevel === 28 && target !== 'default' ) ;
99- }
0 commit comments