flutter does not recognize my Android LG-G2 device

Created on 30 Dec 2016  Â·  3Comments  Â·  Source: flutter/flutter

Steps to Reproduce

Flutter is not recognizing my android phone LG G2 with Android version 5.0.2. My phone is connected via a USB cable and Developer Mode is on.

Logs

Runing flutter analyze caused flutter to quit unexpectedly; the flutter_01.log file was renamed to flutter_01.txt and is attached.
flutter_01.txt

EN-CO-EPFFT1:~ ppolasek$ flutter analyze

Oops; flutter has exited unexpectedly.
Crash report written to /Users/ppolasek/flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.

Flutter Doctor

DEN-CO-EPFFT1:~ ppolasek$ flutter doctor -v
[ +22 ms] [/Users/ppolasek/bin/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +8 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/master
[ ] [/Users/ppolasek/bin/flutter/] git ls-remote --get-url origin
[ +7 ms] Exit code 0 from: 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] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] d05c7f62f24ec73baf15c51f3b32ea66fc139a31
[ ] [/Users/ppolasek/bin/flutter/] git log -n 1 --pretty=format:%ar
[ +7 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 9 days ago
[ +11 ms] [✓] Flutter (on Mac OS, channel master)
[ +1 ms] • Flutter at /Users/ppolasek/bin/flutter
[ ] • Framework revision d05c7f62f2 (9 days ago), 2016-12-21 06:19:42
[ ] • Engine revision 2f32e8054d
[ ] • Tools Dart version 1.21.0
[ +3 ms] java -version
[ +97 ms] [✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
[ ] • Android SDK at /Users/ppolasek/Library/Android/sdk
[ ] • Platform android-25, build-tools 25.0.2
[ ] • Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
[ +4 ms] ideviceinstaller -h
[ +5 ms] idevice_id -h
[ +5 ms] idevice_id -l
[ +26 ms] [-] iOS toolchain - develop for iOS devices
[ ] x XCode not installed; this is necessary for iOS development.
Download at https://developer.apple.com/xcode/download/.
[ +86 ms] [✓] IntelliJ IDEA Community Edition (version 2016.3.1)
[ ] • Dart plugin version 163.9166.22
[ ] • Flutter plugin version 0.1.7
[ +5 ms] /Users/ppolasek/Library/Android/sdk/platform-tools/adb devices -l
[ +10 ms] Exit code 0 from: /Users/ppolasek/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +2 ms] idevice_id -h
[ +6 ms] which idevice_id
[ +3 ms] Exit code 0 from: which idevice_id
[ ] /Users/ppolasek/homebrew/bin/idevice_id
[ ] /Users/ppolasek/homebrew/bin/idevice_id -l
[ +5 ms] Exit code 0 from: /Users/ppolasek/homebrew/bin/idevice_id -l
[ +1 ms] [✓] Connected devices
[ ] • None
[ ] 'flutter doctor' took 316ms.
[ +2 ms] exiting with code 0
DEN-CO-EPFFT1:~ ppolasek$

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

Most helpful comment

I finally figured resolved the issue - in USB PC Connection I had previously selected 'Media device (MTP)' on my phone which apparently blocked access from the Mac. When I changed this to 'Send images (PTP)' my device was immediately recognized via 'flutter devices', and I was also able to run my app in Android Studio.

All 3 comments

It looks like adb (the 'Android Debug Bridge') is not able to see your phone. Can you try to see if a new Android app created in Android Studio is able to run on your device?

Regarding the analyzer issue, looks like it's failing on a permission denied issue. Were you inside the directory that contains your Flutter app when you ran flutter analyze?

For the flutter analyze issue I was _not_ in the directory containing my Flutter app, and when I did run it from within my app directory I received 'No analyzer warnings! (ran in 8.3s). Likely that was an unrelated issue.

I created a new Android app in Android Studio and accepted the default options, but I was unable to run it due to Error running BeerApp: No target device found. I was wondering if it could be tied to Android File Transfer automatically opening when I plug my phone into my Mac, but even after deleting the app from my Applications directory I'm still unable to run my Android Studio app, and flutter devices also indicates 'no devices'.

I finally figured resolved the issue - in USB PC Connection I had previously selected 'Media device (MTP)' on my phone which apparently blocked access from the Mac. When I changed this to 'Send images (PTP)' my device was immediately recognized via 'flutter devices', and I was also able to run my app in Android Studio.

Was this page helpful?
0 / 5 - 0 ratings