EN VI

flutter build apk running error migrating cause?

2024-03-14 15:00:09
How to flutter build apk running error migrating cause

Im taking same build error every time

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

I ran in android studio and vscode same result

Solution:

To solve this the easy ways is to delete the android folder in your project and run flutter create . command in project directory and add any you have previously done in the android folder like permissions or native code etc again in this newly created android folder.

another way to solve it is manually changing the gradle files which is a bit complicated and may cause issues if not followed the steps carefully. here are the steps

Answer

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login