preload-hacks: Some patches to make it work.
[termux-packages] / scripts / setup-android-sdk.sh
index 3152a71..d5c1e17 100755 (executable)
@@ -25,7 +25,7 @@ if [ ! -d $NDK ]; then
        mkdir -p $NDK
        cd $NDK/..
        rm -Rf `basename $NDK`
-       NDK_VERSION=r15
+       NDK_VERSION=r16
        curl --fail --retry 3 -o ndk.zip \
                http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip
 
@@ -35,6 +35,7 @@ if [ ! -d $NDK ]; then
        rm ndk.zip
 fi
 
-mkdir -p $ANDROID_HOME/licenses
-echo -e -n "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
-$ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3" "platforms;android-25"
+yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
+
+# The android-21 platform is used in the ecj package:
+$ANDROID_HOME/tools/bin/sdkmanager "build-tools;27.0.3" "platforms;android-27" "platforms;android-21"