执行批处理 SetupAndroid.bat, 可能会出现以下错误:
thread “main” java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider
has been compiled by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions up to 52.0
国外论坛有大牛提供了一个方法:
Go into Android Studio and under Configure → SDK Manager
On the SDK Tools tab, select “Show Package Details” in the bottom right
Uncheck Android SDK command-line Tools (latest)
Check Android SDK command-line Tools 8.0
Click Apply
In Windows go to “C:\Users\USERNAME\AppData\Local\Android\Sdk\cmdline-tools” and rename the 8.0 folder to “latest”
Run SetupAndroid.bat again