gpt4 book ai didi

android - 在 Android Studio 中 Dart 。没有运行应用程序的设备

转载 作者:IT王子 更新时间:2023-10-29 06:46:15 24 4
gpt4 key购买 nike

我无法运行应用程序,因为列表中没有设备。我尝试创建 AVD 并连接真实设备。我已经安装了 curl,设置了 Android SDK 路径,接受了 flutter 许可证。我有 Ubuntu 16.04.4

项目目录中 flutter run --verbose 的输出:

 flutter: command not found

我有 flutter 路径:

$ export PATH=/home/joe/flutter/bin:$PATH
$ echo $PATH
/home/joe/flutter/bin:home/joe/flutter/bin:home/joe/flutter/bin:/home/joe/bin:/home/joe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

现在我将路径放入 .bashrc 并运行 source ~/.bashrc,我放置路径的方式是否正确?

# set PATH so it includes user's private bin directories

export PATH=/home/joe/flutter/bin:$PATH
export ANDROID_HOME=$HOME/Android/SDK
export PATH=$PATH:$ANDROID_HOME/tools

将路径添加到 .bashrc 后,我运行 flutter doctor:

$ /home/joe/flutter/bin/flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel master, v0.5.7-pre.102, on Linux, locale en_US.UTF-8)
✗ Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6
On Fedora: dnf install libstdc++.i686
On Arch: pacman -S lib32-libstdc++5

[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✓] Android Studio (version 3.1)
[!] IntelliJ IDEA Community Edition (version 2018.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
[!] Connected devices
! No devices available

! Doctor found issues in 4 categories.

最佳答案

可以通过将项目 SDK 设置为最新的 Android API 轻松修复。

  1. 转到文件
  2. 项目结构
  3. 在 Project-SDK 下选择安装的最新 SDK(示例:- Android API 29 平台)。

关于android - 在 Android Studio 中 Dart 。没有运行应用程序的设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51308626/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com