在安装flutter之后,我在ubuntu机器上安装了Android SDK,并在尝试运行模拟器时不断出现此错误。
./emulator -avd khophi
这是我当前系统的路径:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=~/.flutterSetup/flutter/bin:$PATH
# -------
export ANDROID_HOME=/home/user/Android/sdk:$PATH
export ANDROID_SDK_ROOT=/home/user/Android/sdk:$PATH
export PATH=/home/user/Android/sdk/platform-tools:$PATH
export PATH=/home/user/Android/sdk/tools:$PATH
export PATH=/home/user/Android/build-tools:$PATH
运行Flutter Doctor时也会出现此错误:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_NG)
[!] Android toolchain - develop for Android devices (Android SDK
28.0.2)
✗ Android SDK file not found: /home/user/Android/sdk/build-
tools/28.0.2/aapt.
[✗] Android Studio (not installed)
[!]已连接的设备 !没有可用的设备
但是我只能在“ build-tools”中看到版本26.0.3和27.0.3。请帮忙。