flutter plugin project is missing Android features
See original GitHub issueSteps to Reproduce
- Install Flutter plugin into Android Studio 3.0
- File > New Flutter project
- Pick either ‘application’ or ‘plugin’ template, and complete creation wizard
- After creation is complete, expand the top-level
android
folder
=> android features are missing
- no Gradle Scripts top-level folder
- no res folder, so no way to add resources
- code analysis fails, for example:
- Open
src/main/java/<org id>/plugin.java
- Add the import
import android.support.v4.app.NotificationCompat;
- Add a Builder variable:
- In an app: Add a new line inside the
MainActivity
class containingNotificationCompat.Builder builder;
- In a plugin: Add a new line above
result.success...
containingNotificationCompat.Builder builder;
- In an app: Add a new line inside the
=> still complains that it can’t resolve the NotificationCompat
symbol
If you try the same steps in a regular Android project, it works fine.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Option to create a new Flutter project is missing after upgrade ...
After upgrading Android Studio to (3.4) and my Flutter Plugin to (38.2.1), the option to create a new project is missing from the...
Read more >Integrate a Flutter module into your Android project
The Android Studio plugin automatically configures your Android project to add your Flutter module as a dependency, and your app is ready to...
Read more >Install and configure the NDK and CMake - Android Developers
Note: If you have an NDK installed in the ndk-bundle folder, it appears in the list with the label NDK. If you are...
Read more >File > Project Structure is missing for Flutter ... - Issue Tracker
Thank you for the feedback. For issues related to Flutter in Android Studio, please file an issue with the Flutter team at https://github.com/flutter/flutter- ......
Read more >Set up Google Play services
Note: Android Studio projects contain a top-level build.gradle file and a build.gradle file for each module. Be sure to edit the file for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed that the following now works:
flutter create foobar
foobar/android
(theandroid
part is important!)MainActivity.java
and addimport android.support.v4.app.NotificationCompat;
=> will now see the error mentioned at the top of this bug. That is by-design; we need to tell gradle where it’s located
build.gradle (Module: app)
compile 'com.android.support:support-v4:+'
underdependencies
at the bottom=> import should resolve
Fixed with https://github.com/flutter/flutter-intellij/pull/1782