【发布时间】:2020-08-24 07:57:06
【问题描述】:
我在检测 ~/.bashrc 中的 ANDROID_HOME 时遇到了麻烦
当我flutter doctor 时出现此错误:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.2, on Linux, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ ANDROID_HOME = /usr/lib/android-sdk/cmdline-tools/tools/bin
but Android SDK not found at this location.
[!] Android Studio (not installed)
我使用ls $ANDROID_HOME cd 进入ANDROID_HOME,然后ls -la 给了我:
i992@paschal:/usr/lib/android-sdk/cmdline-tools/tools/bin$ ls -la
total 48
drwxr-xr-x 2 root root 4096 Aug 24 14:56 .
drwxr-xr-x 4 root root 4096 Aug 24 14:55 ..
-rwxr-xr-x 1 root root 5322 Aug 24 14:55 apkanalyzer
-rwxr-xr-x 1 root root 5313 Aug 24 14:55 avdmanager
-rwxr-xr-x 1 root root 5281 Aug 24 14:55 lint
-rwxr-xr-x 1 root root 5310 Aug 24 14:55 screenshot2
-rwxr-xr-x 1 root root 5320 Aug 24 14:55 sdkmanager
这确认 sdkmanager 存在。知道为什么颤振没有捡起来吗?
~/.bashrc 路径配置:
export ANDROID_HOME=/usr/lib/android-sdk/cmdline-tools/tools/bin
【问题讨论】:
标签: android android-studio flutter ubuntu