Skip to main content

Posts

Showing posts from March, 2021

Flutter: How to fix “unexpected element found in ” error?

 All of a sudden, I am started getting this build error in my Android project: Error: unexpected element <queries> found in <manifest> Understanding  the Issue: To understanding why this happens see the above @CommonsWare's answer This is because <queries> tag was introduced with new package visibility options for Android 11 and upwards (SDK 30+). Because of that, you need to update your build.gradle with a version that includes this changes. Below is a list of supported gradle options. The best solution to deal with these errors is to Upgrade your Android Gradle plugin and Update Gradle You’ll have to update your Gradle version to one of the compatible versions that have the latest query tags (which were introduced with Android 11). How to Fix it? To Update the Android Gradle plugin Specify the plugin version in the YourAppDirectory/android/build.gradle file. The plugin version applies to all modules built-in that Android Studio project. The following e...

Flutter: mobX store code generate not working

   mobX store code generate not working I had a same issue and I was able to solve with following steps. I had this problem today and put these versions and it worked, in case anyone needs You need to follow just couple of steps. Here is my pubspec.yaml package version for the mobx Step 1: Flutter (Channel stable, 1.22.6) mobx: ^1.2.1+2 build_runner: 1.10.1 mobx_codegen: ^1.1.0+1 Step 2: run following commands flutter clean flutter pub get flutter packages upgrade flutter pub run build_runner watch --delete-conflicting-outputs I trust it will help you :)

How to downgrade flutter?

 How to downgrade flutter? You can downgrade using following setups: Git Hub Source Code :  Flutter is versioned using git. Changing the Flutter version is as simple as changing git branch. Using Flutter Channel: flutter channel <branch> (example: flutter channel stable) This command is used to change between branches – usually stable/dev/beta/master. We can also put a specific commit id from git. Flutter Downgrade Command: flutter downgrade <version> (example: flutter downgrade v1.22.6) This command will use a specific version number. You can have the list of the available version numbers using flutter downgrade or here Then run  flutter doctor and Flutter will take care of downloading/compiling everything required to run this version.