Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add instructions for getting code coverage in Android Studio #51105

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions shell/platform/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ Android Studio:
![Example](https://github.com/flutter/flutter/assets/168174/02fe0e6f-f0c4-47b2-8dae-9aa0b9520503)

At this point you should be able to open Java files in Android Studio and get
code completion in the `io/flutter` folder (additional, undocumented work is
required for `test/io/flutter`). For example, `FlutterJNI.java`:
code completion in the `io/flutter` and `test/io/flutter` folders. For example, `FlutterJNI.java`:

![Example](https://github.com/flutter/flutter/assets/168174/387550d4-eab7-4097-9da3-7713a6ec4da7)

To get code coverage displayed in line: go to the test class you wish to run and
1. Right click > Modify Run Configuration...,
2. In the window that pops up click Modify options > Specify classes
and packages (under "code coverage").
3. In the new box that appears at the bottom of the window, click the + > Add package, and then add `io.flutter.*`.