flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Unable to add Flutter Module in Android app

Open Mayank-9018 opened this issue 3 years ago • 6 comments

Steps to Reproduce

  1. Create a native android app in Android Studio.
  2. Go to File > New > New Module ...
  3. According to the instructions on Integrate a Flutter module into your Android project, you should see and option for Flutter Module, Flutter Project etc. But they are not present.

image

Version info

flutter doctor -v:

[✓] Flutter (Channel stable, 2.8.1, on Pop!_OS 21.10 5.15.15-76051515-generic,
    locale en_US.UTF-8)
    • Flutter version 2.8.1 at /home/mayank-pop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/mayank-pop/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /opt/android-studio-preview/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 13.0.0-2
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2021.1)
    • Android Studio at /opt/android-studio-preview
    • Flutter plugin version 63.2.2
    • Dart plugin version 211.7798
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Android Studio (version 2020.3)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 63.2.1
    • Dart plugin version 203.8452
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.63.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.32.0

[✓] Connected device (3 available)
    • Redmi 4 (mobile) • 6b0b6837d440 • android-arm64  • Android 10 (API 29)
    • Linux (desktop)  • linux        • linux-x64      • Pop!_OS 21.10 5.15.15-76051515-generic
    • Chrome (web)     • chrome       • web-javascript • Google Chrome 97.0.4692.99

• No issues found!

Dart plugin version 211.7798 Flutter plugin version 63.2.2 Tested with Android Studio Arctic Fox 2020.3 and Bumblebee 2021.1.1 RC 1

Mayank-9018 avatar Jan 25 '22 13:01 Mayank-9018

The instructions are valid for older versions of Android Studio. In Arctic Fox they redesigned the new project wizard, which broke our support for add-to-app. We currently do not support add-to-app in Android Studio.

stevemessick avatar Jan 25 '22 16:01 stevemessick

I too am facing the same thing. Bumblebee does not show the options for flutter modules as author shows

prasadsunny1 avatar Feb 11 '22 07:02 prasadsunny1

@stevemessick Google I/O seemed to be trying to promote add2app... Can we bump this a little please?

neiljaywarner avatar May 26 '22 16:05 neiljaywarner

I'll see what we can do. I've scheduled it for the July release, and let's hope we find the time!

cc: @jacob314

stevemessick avatar May 26 '22 17:05 stevemessick

Same here

tech-piktina avatar Sep 07 '22 07:09 tech-piktina

Ohh so its missing in the latest android studio version then it should be updated in documentation also.

akash-bisariya avatar Sep 21 '22 14:09 akash-bisariya

With new gradle dependencyResolutionManagement in settings.gradle integrating got harder. We need officially working solution

nailgilaziev avatar Oct 28 '22 13:10 nailgilaziev

Has there been any progress on this? We have been in the dark since Jan and still have no idea where/if this is being worked on. The docs all show the old dialog for creating the modules. I have only now needed to start implementing app2app and I cannot start easily. To keep adding my flutter modules in manually is getting tedious.

PieterPicup avatar Nov 07 '22 07:11 PieterPicup

No updates in documentation, it's so disappointing

ldsouza93 avatar Dec 22 '22 23:12 ldsouza93

1 year later and still not in the docs

fernando-april-external avatar Jan 23 '23 13:01 fernando-april-external

Evaluating Flutter as a replacement for a large SDK. I really need the basics to work to feel confident in proposing Flutter. Please, any update?

mosofsky avatar Feb 01 '23 21:02 mosofsky

It does work well it's just a few instructions right?

I've had a couple good experiences with add2app

Doesn't Phillips use it a lot?

....sent from my phone

On Wed, Feb 1, 2023, 3:50 PM Michael Osofsky @.***> wrote:

Evaluating Flutter as a replacement for a large SDK. I really need the basics to work to feel confident in proposing Flutter. Please, any update?

— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter-intellij/issues/5914#issuecomment-1412782853, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXBGYJTBF27DCK2SRPHWA3WVLLAXANCNFSM5MYJ35KA . You are receiving this because you commented.Message ID: @.***>

neiljaywarner avatar Feb 01 '23 22:02 neiljaywarner

@neiljaywarner thanks for the intel regarding Phillips. The problem is, according to @stevemessick above, "In Arctic Fox they redesigned the new project wizard, which broke our support for add-to-app. We currently do not support add-to-app in Android Studio."

mosofsky avatar Feb 01 '23 22:02 mosofsky

I understand. I agree it would be nice I'm just saying command line isn't too bad and if I remember right the instructions work great for command line

....sent from my phone

On Wed, Feb 1, 2023, 4:53 PM Michael Osofsky @.***> wrote:

@neiljaywarner https://github.com/neiljaywarner thanks for the intel regarding Phillips. The problem is, according to @stevemessick https://github.com/stevemessick above https://github.com/flutter/flutter-intellij/issues/5914#issuecomment-1021358549, "In Arctic Fox they redesigned the new project wizard, which broke our support for add-to-app. We currently do not support add-to-app in Android Studio."

— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter-intellij/issues/5914#issuecomment-1412852891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXBGYNQU4NB4C5FZJNZNNDWVLSP7ANCNFSM5MYJ35KA . You are receiving this because you were mentioned.Message ID: @.***>

neiljaywarner avatar Feb 02 '23 04:02 neiljaywarner

One of the best things about Flutter is the great documentation you provide. 👓 But this issue broke that opinion.

Please, either solve this issue or change the documentation. Having not valid documentation wastes developer's time. ⏳

In 2023 it's becoming very actual for people to think more serious about either integrating Flutter as a module or replacing their existing application to Flutter. So helping Flutter developers with a good, valid and up to date documentation allows them to be more productive. 🏄‍♂️

Galti avatar Feb 02 '23 11:02 Galti

@neiljaywarner great, I'll check out the command line interface's equivalent for adding a Flutter module to an existing application. I found the documentation for that at https://docs.flutter.dev/development/add-to-app/android/project-setup#create-a-flutter-module

mosofsky avatar Feb 02 '23 19:02 mosofsky

@Galti @ldsouza93 did you know they allow pull requests on their documentation? Hope that doesn't come off snarky or rude. I personally didn't find the bandwidth to do it but i hope to someday thanks

neiljaywarner avatar Feb 02 '23 22:02 neiljaywarner

@neiljaywarner thank you for hinting :) But you don't know much about my knowledge. To be able to open a PR about the docs one should first understand what's going on under the hood.

Galti avatar Feb 03 '23 05:02 Galti

Hi All So while creating a new project over the weekend I found out where the creation of a new flutter module is. I know it is not 100% the behaviour which we are looking for here to add a flutter module into an android app but it is a way to create the module from the UI. File -> New -> Flutter Project Click next button after confirming your flutter SDK path. The "Project Type" dropdown then contains options for Module and Plugin. image

PieterPicup avatar Feb 06 '23 07:02 PieterPicup