Search code examples
android-studioflutterlogcatandroid-profiler

How to use Android Profiler and Logcat in AndroidStudio 3 in Flutter projects


Running emulators with API 28 or 27 via Android Studio, the Flutter configuration successfully launches the application and there are no other problems, i.e. all other features work fine.

Why is the device not being detected by the Android Profiler? There are no resources describing similar problems.

A similar issue also occurs when trying to view Logcat:


Solution

  • To make these two tools work, the android module needs to be opened. You can do this by either opening the Flutter context menu of the android directory in the project view or by navigating to Tools -> Flutter:

    After this, i.e. while the Android module is openend in Android Studio, the Android Profiler and Logcat will work fine.

    See also: https://flutter.io/docs/development/tools/android-studio#editing-android-code-in-android-studio-with-full-ide-support