Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. unexpected element <queries> found <manifest> in a flutter. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
How unexpected element <queries> found <manifest> Error Occurs ?
When I was trying to run my flutter app and suddenly I get the following error in my stack track.
unexpected element <queries> found in <manifest>
How to Solve unexpected element <queries> found <manifest> Error?
- How to Solve unexpected element
found Error? To Solve unexpected element <queries> found <manifest> Error Delete the .gradle folder inside the android folder ie android>.gradle In the project build.gradle file, upgrade ur class path appropriately based on the blog in the link above. Just upgraded to classpath 'com.android.tools.build:gradle:4.0.1' Upgrade the distribution url too. Its in android>gradle>gradle-wrapper.properties file appropriately. I upgraded it to distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip Now just invalidate caches and restart your android studio. Make sure you have a good internet connection because it will download the new gradle files.
- unexpected element
found To Solve unexpected element <queries> found <manifest> Error Delete the .gradle folder inside the android folder ie android>.gradle In the project build.gradle file, upgrade ur class path appropriately based on the blog in the link above. Just upgraded to classpath 'com.android.tools.build:gradle:4.0.1' Upgrade the distribution url too. Its in android>gradle>gradle-wrapper.properties file appropriately. I upgraded it to distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip Now just invalidate caches and restart your android studio. Make sure you have a good internet connection because it will download the new gradle files.
Solution 1: upgraded to classpath
- Delete the .gradle folder inside the android folder ie android>.gradle
- In the project build.gradle file, upgrade ur class path appropriately based on the blog in the link above.
- Just upgraded to
classpath 'com.android.tools.build:gradle:4.0.1'
- Upgrade the distribution url too. Its in android>gradle>gradle-wrapper.properties file appropriately.
- I upgraded it to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
- Now just invalidate caches and restart your android studio. Make sure you have a good internet connection because it will download the new gradle files.
Solution 2: upgrading build gradle version
previous setting in build.gradle file of project was:
classpath("com.android.tools.build:gradle:3.5.3")
current setting:
classpath("com.android.tools.build:gradle:3.5.4")
The issue was gone immediately. 🙂
Summery
So, It’s All About an unexpected element <queries> found in <manifest> flutter. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.
Leave a Reply