Project import generated by Copybara.

GitOrigin-RevId: 4cee4a2c2317fb190680c17e31ebbb03bb73b71c
This commit is contained in:
MediaPipe Team
2020-09-17 11:09:17 -04:00
committed by chuoling
parent 1db91b550a
commit a908d668c7
142 changed files with 40878 additions and 574 deletions
+6 -7
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2019 The MediaPipe Authors.
# Copyright 2019-2020 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,8 +17,7 @@
# Script to setup Android SDK and NDK.
# usage:
# $ cd <mediapipe root dir>
# $ chmod +x ./setup_android_sdk_and_ndk.sh
# $ ./setup_android_sdk_and_ndk.sh ~/Android/Sdk ~/Android/Ndk r18b
# $ bash ./setup_android_sdk_and_ndk.sh ~/Android/Sdk ~/Android/Ndk r18b
set -e
@@ -59,14 +58,14 @@ fi
if [ -d "$android_sdk_path" ]
then
echo "Warning: android_sdk_path is non empty. Android SDK Installation will be ignored."
echo "Warning: android_sdk_path is non empty. Installation of the Android SDK will be skipped."
else
rm -rf /tmp/android_sdk/
mkdir /tmp/android_sdk/
curl https://dl.google.com/android/repository/sdk-tools-${platform}-4333796.zip -o /tmp/android_sdk/android_sdk.zip
unzip /tmp/android_sdk/android_sdk.zip -d /tmp/android_sdk/
curl https://dl.google.com/android/repository/commandlinetools-${platform}-6609375_latest.zip -o /tmp/android_sdk/commandline_tools.zip
unzip /tmp/android_sdk/commandline_tools.zip -d /tmp/android_sdk/
mkdir -p $android_sdk_path
/tmp/android_sdk/tools/bin/sdkmanager --update
/tmp/android_sdk/tools/bin/sdkmanager --update --sdk_root=${android_sdk_path}
/tmp/android_sdk/tools/bin/sdkmanager "build-tools;29.0.1" "platform-tools" "platforms;android-29" --sdk_root=${android_sdk_path}
rm -rf /tmp/android_sdk/
echo "Android SDK is now installed. Consider setting \$ANDROID_HOME environment variable to be ${android_sdk_path}"