<p>Flutter 无法识别我的 Android LG-G2 设备</p>

创建于 2016-12-30  ·  3评论  ·  资料来源: flutter/flutter

重现步骤

Flutter 无法识别我的 Android 手机 LG G2,Android 版本为 5.0.2。 我的手机是通过 USB 数据线连接的,并且开发者模式已打开。

日志

运行flutter analyze导致 Flutter 意外退出; flutter_01.log 文件已重命名为 flutter_01.txt 并附上。
flutter_01.txt

EN-CO-EPFFT1:~ ppolasek$ 颤振分析

哎呀; Flutter 意外退出。
写入 /Users/ppolasek/flutter_01.log 的崩溃报告;
请通过https://github.com/flutter/flutter/issues 告诉我们。

颤振医生

DEN-CO-EPFFT1:~ ppolasek$ 颤振医生 -v
[ +22 ms] [/Users/ppolasek/bin/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +8 ms] 退出代码 0 来自:git rev-parse --abbrev-ref --symbolic @{u}
[]起源/主人
[ ] [/Users/ppolasek/bin/flutter/] git ls-remote --get-url origin
[+7 毫秒] 退出代码 0 来自:git ls-remote --get-url origin
[] https://github.com/flutter/flutter.git
[ ] [/Users/ppolasek/bin/flutter/] git log -n 1 --pretty=format:%H
[ +8 ms] 退出代码 0 来自:git log -n 1 --pretty=format:%H
[]d05c7f62f24ec73baf15c51f3b32ea66fc139a31
[ ] [/Users/ppolasek/bin/flutter/] git log -n 1 --pretty=format:%ar
[ +7 ms] 退出代码 0 来自:git log -n 1 --pretty=format:%ar
[ ] 9 天前
[ +11 ms] [✓] Flutter(在 Mac OS 上,通道主控)
[ +1 ms] • Flutter 在 /Users/ppolasek/bin/flutter
[ ] • 框架修订d05c7f62f2(9天前),2016-12-21 06:19:42
[ ] • 引擎版本 2f32e8054d
[ ] • 工具 Dart 版本 1.21.0
[+3 毫秒] java-版本
[ +97 ms] [✓] Android 工具链 - 为 Android 设备开发 (Android SDK 25.0.2)
[ ] • Android SDK 位于 /Users/ppolasek/Library/Android/sdk
[ ] • 平台 android-25,构建工具 25.0.2
[ ] • Java(TM) SE 运行时环境(内部版本 1.8.0_60-b27)
[+4 毫秒] ideviceinstaller -h
[+5 毫秒] idevice_id -h
[+5 毫秒] idevice_id -l
[ +26 ms] [-] iOS 工具链 - 为 iOS 设备开发
[ ] x XCode 未安装; 这是 iOS 开发所必需的。
https://developer.apple.com/xcode/download/ 下载。
[ +86 ms] [✓] IntelliJ IDEA 社区版(2016.3.1 版)
[ ] • Dart 插件版本 163.9166.22
[ ] • Flutter 插件版本 0.1.7
[+5 毫秒] /Users/ppolasek/Library/Android/sdk/platform-tools/adb devices -l
[+10 ms] 退出代码 0:/Users/ppolasek/Library/Android/sdk/platform-tools/adb devices -l
[ ] 附加设备列表
[+2 毫秒] idevice_id -h
[+6 毫秒] 哪个 idevice_id
[+3 毫秒] 退出代码 0 来自:哪个 idevice_id
[]/用户/ppolasek/homebrew/bin/idevice_id
[]/用户/ppolasek/homebrew/bin/idevice_id -l
[ +5 ms] 退出代码 0 来自:/Users/ppolasek/homebrew/bin/idevice_id -l
[ +1 ms] [✓] 连接的设备
[ ] • 没有任何
[]“颤振医生”耗时 316 毫秒。
[ +2 ms] 以代码 0 退出
DEN-CO-EPFFT1:~ ppolasek$

有关诊断和报告 Flutter 错误的更多信息,请参阅https://flutter.io/bug-reports/

最有用的评论

我终于想办法解决了这个问题——在 USB PC 连接中,我之前在手机上选择了“媒体设备 (MTP)”,这显然阻止了从 Mac 的访问。 当我将其更改为“发送图像 (PTP)”时,我的设备立即通过“颤振设备”被识别,并且我还能够在 Android Studio 中运行我的应用程序。

所有3条评论

看起来 adb(“Android 调试桥”)无法看到您的手机。 您能否尝试查看在 Android Studio 中创建的新 Android 应用程序是否能够在您的设备上运行?

关于分析器问题,看起来它在权限被拒绝问题上失败了。 当您运行flutter analyze时,您是否在包含您的 Flutter 应用程序的目录中?

对于flutter analyze问题,我_not_ 在包含我的 Flutter 应用程序的目录中,当我从我的应用程序目录中运行它时,我收到“没有分析器警告! (在 8.3 秒内运行)。 很可能这是一个不相关的问题。

我在 Android Studio 中创建了一个新的 Android 应用程序并接受了默认选项,但由于Error running BeerApp: No target device found.我无法运行它我想知道它是否可以绑定到当我将手机插入时自动打开的 Android 文件传输我的 Mac,但即使从我的 Applications 目录中删除应用程序后,我仍然无法运行我的 Android Studio 应用程序,并且flutter devices也表示“无设备”。

我终于想办法解决了这个问题——在 USB PC 连接中,我之前在手机上选择了“媒体设备 (MTP)”,这显然阻止了从 Mac 的访问。 当我将其更改为“发送图像 (PTP)”时,我的设备立即通过“颤振设备”被识别,并且我还能够在 Android Studio 中运行我的应用程序。

此页面是否有帮助?
0 / 5 - 0 等级