-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flutter create -t package
warns about deprecated Android embeddings
#116320
Comments
I see this warning in all kinds of places. I just checked out |
Subsequently running |
Creating a new packages on windows on latest channel flutter doctor -v
flutter create -t package test
verbose output for above command exceed GitHub character limits. Same command without running flutter create -t package test --no-pub -v
|
Same problem here:
|
This comment was marked as duplicate.
This comment was marked as duplicate.
Plain dart package works fine ( |
It's true for me too. I encountered the same problem when I tried to create a package for my new project. I would like to use a package for the flutter doctor -v
After running the command: output
Does this mean I need to edit every package I create? My goal was to use package-based separation |
When creating a package, using |
True, but when you add android, the warning is there |
This comment was marked as duplicate.
This comment was marked as duplicate.
What is the difference between "dart create --template=package-simple " and "flutter create --template=package "? The one starting with flutter also creates android, ios, web folders but that shouldnt be the case if Im not wrong: |
The embedding warning turned into an error when trying to run tests. In my specific case, if you include device_info_plus which requires android embedding v2, the tests will not run. I also wondered if I should be using Just an update: since my tests don't actually use device_info_plus as they are just unit tests I can run |
Should the advice be followed as suggested by the warning message?
|
Flutter 3.3.10 = OK, no issue Results with 3.3.10 and 3.7.0:
|
This comment was marked as duplicate.
This comment was marked as duplicate.
Has there been any update on this? |
Any ideas on how to solve this issue? I am currently using Android Studio to create a package, but it will constantly warn me about the outdated Android Embedding.
|
I used fvm to be on 3.3.10 when creating a package. |
flutter create --template=package is creating lots of crap it shouldn't for some reason. I compared it to one of my previously created packages and just deleted the android, ios, linux, macos and windows folders + the .idea folder, the .iml file and the dartpad folder from the .dart_tool folder. Worked for me, hope it works for you too |
same issue when using the |
I am pretty sure it shouldn't have any of the platform folders in the first place. Only plugin packages have those. And when you create a plugin package with flutter create --template=plugin demo it doesn't get those folders until you add platform support with flutter create --template=plugin --platforms android,ios . |
`package` template should not create platform folders. This happen cause by default all platforms are supported and tools didn't distinguish between package and other template, which makes all platforms are true for below code, https://github.com/flutter/flutter/blob/d186792c00f61149916f685e2975300342f64749/packages/flutter_tools/lib/src/project.dart#L374-L380 fixes: #119844 which make #116320 makes invalid. As for why tools created deprecated `Android Embedding`, `appManifestFile` does not exist for `package` template, which make below code to trigger, https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/project.dart#L768-L770 This does not happen with `module` and `plugin` as it have specific condition check for them. I try to reproduce it with `app` template but didn't succeed
Closing as fixed by #125292 |
Thanks @andrewkolos. Since I already started a package with a lot of work using the old template (created by flutter 3.7.1), how should I proceed? create a new template and migrate all the files? |
#125292 was only merged into the master branch, so it is not yet available in the In the meantime, it should be sufficient to delete the unnecessary platform folders (including |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Run
flutter create -t package testpackage
on a Linux machine with no devices attached:Notice in particular the part that says:
This machine has the following configuration:
The text was updated successfully, but these errors were encountered: