Skip to content

Flutter plugin project in Android studio #124587

@JarvanMo

Description

@JarvanMo

Recently I have created a new Flutter plugin project and I open it in Android studio. In previous versions, I just right click on the project and select Flutter->Open Android module in Android studio and then Android studio open plugin module and example together.
But in the recent versions, I also right click on example/android and open it Android Studio. However, it only opens the example/android mdoule, not include project/android.

I try to open project/android directly and it is opened as well. But the problem is everything related to Flutter and Androidx in the Plugin.kt is Unresolved reference.

image

Is there anyone can help me on this? Thank you.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.10, on macOS 12.6.3 21G419 darwin-x64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version
    33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Community Edition (version 2023.1)
[✓] VS Code (version 1.77.0)
[✓] Connected device (4 available)
    ! Error: iPhone has recently restarted. Xcode will continue when iPhone is
      unlocked. (code -14)
[✓] HTTP Host Availability

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions