react-native-navigation的迁移库

installAndroidSDK.sh 908B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash -e
  2. scriptdir="$(dirname "${BASH_SOURCE[0]}")"
  3. export ANDROID_HOME=$HOME/android-sdk
  4. export PATH=$PATH:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
  5. mkdir $ANDROID_HOME
  6. # fix for https://code.google.com/p/android/issues/detail?id=223424
  7. mkdir -p ~/.android
  8. touch ~/.android/repositories.cfg
  9. echo "Downloading Android SDK"
  10. curl --location https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip | tar -x -z -C $ANDROID_HOME
  11. echo "Copying Android Licenses"
  12. mkdir -p "${ANDROID_HOME}"/licenses
  13. cp "$scriptdir/android-sdk-licenses/"* "${ANDROID_HOME}"/licenses
  14. package="system-images;android-24;default;x86"
  15. echo "Downloading emulator"
  16. sdkmanager "emulator"
  17. echo "Downloading $package"
  18. sdkmanager "${package}"
  19. echo "Creating avd"
  20. echo no | avdmanager create avd --force --name "pixel" --abi "default/x86" --package "${package}" --device "pixel"
  21. sleep 2
  22. avdmanager list avd