mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
fix validate-android-test-env.sh (#22961)
Summary: fix validate-android-test-env.sh to not parse .gradle files for build tools versions, because it was removed. Changelog: ---------- [CI] [Changed] - fix validate-android-test-env.sh to not try parse .gradle files Pull Request resolved: https://github.com/facebook/react-native/pull/22961 Differential Revision: D13655750 Pulled By: hramos fbshipit-source-id: 1accb6ac7a7c74ab335dd92977b0b090820a622c
This commit is contained in:
committed by
Facebook Github Bot
parent
73434e6cba
commit
8a8a11b77a
@@ -52,9 +52,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# BUILD_TOOLS_VERSION is in a format like "23.0.1"
|
||||
BUILD_TOOLS_VERSION=`grep buildToolsVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/^[^"]*\"//' | sed 's/"//'`
|
||||
|
||||
# MAJOR is something like "23"
|
||||
MAJOR=`grep compileSdkVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/[^[:digit:]]//g'`
|
||||
|
||||
@@ -74,15 +71,15 @@ if [ ! -e "$PLATFORM_DIR" ]; then
|
||||
fi
|
||||
|
||||
# Check that we have the right version of the build tools.
|
||||
BT_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION"
|
||||
BT_DIR="$ANDROID_HOME/build-tools/$ANDROID_SDK_BUILD_TOOLS_REVISION"
|
||||
if [ ! -e "$BT_DIR" ]; then
|
||||
echo "Error: could not find version $BUILD_TOOLS_VERSION of the Android build tools."
|
||||
echo "Error: could not find version $ANDROID_SDK_BUILD_TOOLS_REVISION of the Android build tools."
|
||||
echo "Specifically, the directory $BT_DIR does not exist."
|
||||
echo "You probably need to explicitly install the correct version of the Android SDK Build Tools from within Android Studio."
|
||||
echo "See https://facebook.github.io/react-native/docs/getting-started.html for details."
|
||||
echo "If you are using Android SDK Tools from the command line, you may need to run:"
|
||||
echo
|
||||
echo " sdkmanager \"platform-tools\" \"build-tools;android-$BUILD_TOOLS_VERSION\""
|
||||
echo " sdkmanager \"platform-tools\" \"build-tools;android-$ANDROID_SDK_BUILD_TOOLS_REVISION\""
|
||||
echo
|
||||
echo "Check out https://developer.android.com/studio/command-line/sdkmanager.html for details."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user