I just created a new flutter project, added a few plugins and I'm getting the plugin switched to android x therefore i need to switch to android x. I've tried all the different ways of moving to android x and none has worked for me so far. Right now i don't even know what to do anymore, its so frustrating, why wouldn't flutter handle that when creating new projects automatically. Might be using ionic for the project.
Right from the reasons why I think Flutter mobile development is the future, to the comparisons between the framework and other development platforms, we have been looking into the ways features of Flutter makes it ideal for cross-platform application development today and in the future.
About most of youtube is written in python. I can't say which module, flutter or whatever, but I can say it's python. Some of the other important functions were written in c/c++. And some other things are written in java & javascript.
As you are creating a new project, just follow @harsh 's answer and you're done.
However, as I recently upgraded my existing app to use new plugins, I had to migrate to AndroidX as well... and the default procedure in the official instructions didn't work, which is using Android Studio to migrate the project - it said "No usages found!".
So what I did was:
android/gradle.properties
and addedandroid.useAndroidX=true android.enableJetifier=true
opened android/build.gradle
and changed
com.android.tools.build:gradle
to version 3.3.0
com.google.gms:google-services
to version 4.2.0
opened android/app/build.gradle
and
compileSdkVersion
to 28
android.support.test.runner.AndroidJUnitRunner
to androidx.test.runner.AndroidJUnitRunner
com.android.support.test:runner
to androidx.test:runner:1.1.0
com.android.support.test.espresso:espresso-core
to androidx.test.espresso:espresso-core:3.1.0
opened android/gradle/wrapper/gradle-wrapper.properties
and changed distributionUrl
to https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
(you might have to use 5.4.1, please see update below)
executed flutter clean
And contrary to what I expected, IT WORKED! :)
When updating my app to flutter v1.9.1+hotfix.5
, as I use app signing, I was stuck with the error SigningConfig "release" is missing required property "storePassword"
and in the end it was the gradle version from step 7 above. So now I'm using 5.4.1 as suggested in this wiki.
[android/gradle/wrapper/gradle-wrapper.properties] distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
I've made the migration successfully by using Sam's answer!
1. Open the Flutter project into Android Studio 2. Right click on the android directory and Flutter -> Open Android module in Android Studio. It asked me to upgrade my gradle plugin. 3. Then I installed Google Play Services. Tools -> SDK Manager -> SDK Tools and chek the Goolge Play Services.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With