I just import webview_flutter plugin and found that the plugin has incompatible with my flutter environment. Then using Android Studio I migrate my AndroidX environment with
Create a new flutter project and move existing code to it: flutter migration
flutter create --androidx -t <project-type> <new-project-path>
eg: flutter create --androidx -t app .
In AndroidManifest file add permission under manifest tag
Thanks for your suggestion,
I've fixed it by doing these steps : 1. Try adding this line In your Project folder > android > app > build.gradle, add the following Line in
multiDexEnabled true
inside defaultConfig
Then upgrade gradle dependency in the android/build.gradle file: classpath 'com.android.tools.build:gradle:3.3.1' (previously on version 3.2.1)
Run flutter clean and rebuild your project
First make sure that all your packages in the pubspec.yaml are of the latest version. Then open the android project of your flutter app with android studio, select Refactor->Migrate to Androidx(make sure that you are doing that that from the android project and not from the flutter one). Wait until android studio finishes migrating your project, rebuild your project. Hope it helps!
It seems like you are facing issues with dex
and androidX
.
Follow https://stackoverflow.com/a/56490440/9236994
this answer to resolve your issue.
you can solve this issue by following these step which is given in this link
https://medium.com/@sahaishashank2507/the-gradle-failure-may-have-been-because-of-androidx-incompatibilities-in-this-flutter-app-39b34acee40e?source=---------2------------------
You need to open your project in the android studio.
select Refactor->Migrate to Androidx(You need to migrate Android Project not
flutter one)
Android Studio finish some process you have to wait for it .
Than rebuild your project and it will work fine.
it can resolve your issue