DevOps | Cloud | Analytics | Open Source | Programming





How To Fix - Unexpected Element Queries Found in Manifest in Android ?



In this post, we will see How To Fix - "unexpected element found in " in Android ?


unexpected element <queries> found in <manifest>

This error occurs from manifest merger . If you have an upgraded version of  library which contains the   element in its manifest, that will cause an issue. The Android Gradle plugin requires clarity with regards to elements in the manifest merger. It should be aware of the new manifest elements - especially for the manifest merger process. Android 11 introduced the as a manifest element. Hence the older versions of the Android Gradle Plugin would not be aware of this element. And in most cases you need to use a compatible or upgraded Gradle version. You would have to update the Gradle version to the compatible version which has the latest query tags. Before we proceed for the solution, it is always recommended to -

  • Update the Android Studio to the latest version
  • Use the last Stable Gradle pluggin
  • Write queries code in out of application tag
Use the Reference section below to find the Gradle versions. There are two files which you might be aware with regards to Gradle -

  • android/build.gradle

buildscript {    
    repositories {
       google()
       jcenter()
    }

    dependencies {
       classpath 'com.android.tools.build:gradle:xx.yy.zz'
    }
 }

  • android/gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE\_USER\_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE\_USER\_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-x.y.z-all.zip

Having discussed all these information, now lets see how we can fix the above error.  

Solution 1:

  • Upgrade the associated patch version with regards to your Gradle version - xx.yy.zz in build.gradle file. This is the easiest solution.

buildscript {

dependencies {
   classpath 'com.android.tools.build:gradle:**xx.yy.zz**'
 }

 

Solution 2 :

  • Use a Higher Android Studio with compatible Gradle Plugin.
 

Solution 3 :

  • Identify the .gradle folder.
  • Open the build.gradle file. And then modify the class path in tandem with explanation given above.

classpath 'com.android.tools.build:gradle:**xx.yy.zz**'

  • Open the gradle-wrapper.properties file. And then upgrade the distribution url as appropriate. Alternatively you can specify the Gradle version in File > Project Structure > Project menu in Android Studio

distributionUrl = https\\://services.gradle.org/distributions/gradle-x.y.z-all.zip

  • Restart Android Studio.
 

Reference - Gradle version :

The below table lists Gradle version for each of the Android Gradle plugin.  Use the latest possible version of both Gradle and the plugin as a recommendation.

Plugin version

Required Gradle version

1.0.0 - 1.1.3

2.2.1 - 2.3

1.2.0 - 1.3.1

2.2.1 - 2.9

1.5.0

2.2.1 - 2.13

2.0.0 - 2.1.2

2.10 - 2.13

2.1.3 - 2.2.3

2.14.1 - 3.5

2.3.0+

3.3+

3.0.0+

4.1+

3.1.0+

4.4+

3.2.0 - 3.2.1

4.6+

3.3.0 - 3.3.3

4.10.1+

3.4.0 - 3.4.3

5.1.1+

3.5.0 - 3.5.4

5.4.1+

3.6.0 - 3.6.4

5.6.4+

4.0.0+

6.1.1+

4.1.0+

6.5+

4.2.0+

6.7.1+

7.0

7.0+

  Hope this solves the error.  

Additional Read -

 


unexpected element queries found in manifest application ,unexpected element queries found in manifest react native ,unexpected element queries found in manifest unity ,unexpected element queries found in manifest xamarin forms ,unexpected element queries found in manifest xamarin ,unexpected element queries found in manifest unity3d ,unexpected element queries found in manifest visual studio ,unexpected element <queries> found in <manifest visual studio ,ionic aapt: error: unexpected element <queries> found in <manifest>. ,aapt error unexpected element queries found in manifest . unity ,aapt error unexpected element queries found in manifest . react native ,aapt error unexpected element queries found in manifest . n tool aapt ,ionic aapt error unexpected element queries found in manifest ,androidmanifest.xml error unexpected element queries found in manifest ,xamarin error apt2263 unexpected element queries found in manifest ,flutter file picker aapt error unexpected element queries found in manifest ,unexpected element queries found in manifest ,unexpected element queries found in manifest . android ,androidmanifest xml 11 5 24 15 aapt error unexpected element queries found in manifest ,where to add queries in <manifest ,android manifest queries example ,element <queries is not allowed here ,consider adding a <queries declaration to your manifest ,android 11 manifest queries ,unexpected element <queries> found in <manifest> ,unexpected element queries found in manifest application ,unexpected element queries found in manifest react native ,unexpected element queries found in manifest xamarin ,unexpected element queries found in manifest unity ,unexpected element queries found in manifest xamarin forms ,unexpected element queries found in manifest unity3d ,unexpected element queries found in manifest visual studio ,aapt error unexpected element queries found in manifest . unity ,aapt error unexpected element queries found in manifest . react native ,aapt error unexpected element queries found in manifest . n tool aapt ,ionic aapt error unexpected element queries found in manifest ,androidmanifest.xml error unexpected element queries found in manifest ,xamarin error apt2263 unexpected element queries found in manifest ,flutter file picker aapt error unexpected element queries found in manifest ,unexpected element queries found in manifest ,unexpected element queries found in manifest . android ,error unexpected element queries found in manifest ,error unexpected element queries found in manifest application ,react-native-image-crop-picker unexpected element queries found in manifest ,unexpected element queries found in manifest flutter ,aapt error unexpected element queries found in manifest . in flutter ,android resource linking failed unexpected element queries found in manifest ,unexpected element provider found in manifest queries ,aapt error unexpected element provider found in manifest queries ,unexpected element queries found in manifest android studio ,androidmanifest.xml aapt error unexpected element queries found in manifest ,unexpected element queries found in manifest application activity ,error unexpected element queries found in manifest . unity ,error unexpected element queries found in manifest react native ,unexpected element queries found in manifest . flutter ,unexpected element provider found in manifest xamarin ,unexpected element queries found in manifest . unity ,unity error unexpected element queries found in manifest , ,unexpected element <queries> found in <manifest> ,unexpected element queries found in manifest application ,unexpected element queries found in manifest react native ,unexpected element queries found in manifest xamarin ,unexpected element queries found in manifest unity ,unexpected element queries found in manifest xamarin forms ,unexpected element queries found in manifest unity3d ,unexpected element queries found in manifest visual studio , ,error unexpected element queries found in manifest ,error unexpected element queries found in manifest application ,react-native-image-crop-picker unexpected element queries found in manifest ,unexpected element queries found in manifest flutter ,aapt error unexpected element queries found in manifest . in flutter ,android resource linking failed unexpected element queries found in manifest ,unexpected element provider found in manifest queries ,aapt error unexpected element provider found in manifest queries ,unexpected element queries found in manifest android studio ,androidmanifest.xml aapt error unexpected element queries found in manifest ,unexpected element queries found in manifest application activity ,error unexpected element queries found in manifest . unity ,error unexpected element queries found in manifest react native ,unexpected element queries found in manifest . flutter ,unexpected element provider found in manifest xamarin ,unexpected element queries found in manifest . unity ,unity error unexpected element queries found in manifest , , ,aapt error unexpected element provider found in manifest queries ,aapt error unexpected element queries found in manifest ,aapt error unexpected element queries found in manifest . in flutter ,aapt error unexpected element queries found in manifest . n tool aapt ,aapt error unexpected element queries found in manifest . react native ,aapt error unexpected element queries found in manifest . unity ,android resource linking failed error unexpected element queries found in manifest ,android resource linking failed unexpected element queries found in manifest ,androidmanifest.xml aapt error unexpected element queries found in manifest ,androidmanifest.xml error unexpected element queries found in manifest ,error unexpected element queries found in manifest ,error unexpected element queries found in manifest . unity ,error unexpected element queries found in manifest application ,error unexpected element queries found in manifest react native ,flutter aapt error unexpected element queries found in manifest ,flutter file picker aapt error unexpected element queries found in manifest ,ionic aapt error unexpected element queries found in manifest ,react-native-image-crop-picker unexpected element queries found in manifest ,unexpected element provider found in manifest queries ,unexpected element queries found in manifest ,unexpected element queries found in manifest . android ,unexpected element queries found in manifest android studio ,unexpected element queries found in manifest application ,unexpected element queries found in manifest because ,unexpected element queries found in manifest build ,unexpected element queries found in manifest data ,unexpected element queries found in manifest declaration ,unexpected element queries found in manifest dependency ,unexpected element queries found in manifest does ,unexpected element queries found in manifest flutter ,unexpected element queries found in manifest git ,unexpected element queries found in manifest grid ,unexpected element queries found in manifest group ,unexpected element queries found in manifest handle ,unexpected element queries found in manifest handler ,unexpected element queries found in manifest headers ,unexpected element queries found in manifest history ,unexpected element queries found in manifest html ,unexpected element queries found in manifest js ,unexpected element queries found in manifest js file ,unexpected element queries found in manifest json ,unexpected element queries found in manifest json file ,unexpected element queries found in manifest key ,unexpected element queries found in manifest method ,unexpected element queries found in manifest module ,unexpected element queries found in manifest object ,unexpected element queries found in manifest output ,unexpected element queries found in manifest query ,unexpected element queries found in manifest react native ,unexpected element queries found in manifest unity ,unexpected element queries found in manifest unity3d ,unexpected element queries found in manifest visual studio ,unexpected element queries found in manifest xamarin ,unexpected element queries found in manifest xamarin forms ,unexpected element queries found in manifest year ,unexpected element queries found in manifest year 2 ,unexpected element queries found in manifest yearly ,unexpected element queries found in manifest zero ,unexpected element queries found in manifest zip ,unexpected element queries found in manifest zip file ,unity aapt error unexpected element queries found in manifest ,visual studio unexpected element queries found in manifest ,xamarin error apt2263 unexpected element queries found in manifest ,xamarin unexpected element queries found in manifest ,aapt error unexpected element queries found in manifest ,aapt error unexpected element queries found in manifest . android ,android resource linking failed error unexpected element queries found in manifest ,android resource linking failed unexpected element queries found in manifest ,androidmanifest.xml error unexpected element queries found in manifest ,error unexpected element queries found in manifest ,error unexpected element queries found in manifest . android ,error unexpected element queries found in manifest application ,unexpected element queries found in manifest ,unexpected element queries found in manifest . android ,unexpected element queries found in manifest . flutter ,unexpected element queries found in manifest android ,unexpected element queries found in manifest android background ,unexpected element queries found in manifest android body ,unexpected element queries found in manifest android build ,unexpected element queries found in manifest android button ,unexpected element queries found in manifest android c# ,unexpected element queries found in manifest android cache ,unexpected element queries found in manifest android case ,unexpected element queries found in manifest android code ,unexpected element queries found in manifest android data ,unexpected element queries found in manifest android database ,unexpected element queries found in manifest android device ,unexpected element queries found in manifest android download ,unexpected element queries found in manifest android game ,unexpected element queries found in manifest android git ,unexpected element queries found in manifest android github ,unexpected element queries found in manifest android install ,unexpected element queries found in manifest android ios ,unexpected element queries found in manifest android jar ,unexpected element queries found in manifest android java ,unexpected element queries found in manifest android js ,unexpected element queries found in manifest android json ,unexpected element queries found in manifest android key ,unexpected element queries found in manifest android kotlin ,unexpected element queries found in manifest android mobile ,unexpected element queries found in manifest android model ,unexpected element queries found in manifest android module ,unexpected element queries found in manifest android name ,unexpected element queries found in manifest android native ,unexpected element queries found in manifest android not found ,unexpected element queries found in manifest android not working ,unexpected element queries found in manifest android number ,unexpected element queries found in manifest android object ,unexpected element queries found in manifest android option ,unexpected element queries found in manifest android os ,unexpected element queries found in manifest android output ,unexpected element queries found in manifest android permission ,unexpected element queries found in manifest android phone ,unexpected element queries found in manifest android port ,unexpected element queries found in manifest android programmatically ,unexpected element queries found in manifest android project ,unexpected element queries found in manifest android query ,unexpected element queries found in manifest android questions ,unexpected element queries found in manifest android queue ,unexpected element queries found in manifest android quiz ,unexpected element queries found in manifest android studio ,unexpected element queries found in manifest android table ,unexpected element queries found in manifest android theme ,unexpected element queries found in manifest android tv ,unexpected element queries found in manifest android tv box ,unexpected element queries found in manifest android unity ,unexpected element queries found in manifest android update ,unexpected element queries found in manifest android wpf ,unexpected element queries found in manifest android x86 ,unexpected element queries found in manifest android xamarin ,unexpected element queries found in manifest android xcode ,unexpected element queries found in manifest android xml ,unexpected element queries found in manifest android xml file ,unexpected element queries found in manifest android yolo ,unexpected element queries found in manifest android youtube ,unexpected element queries found in manifest android zero ,unexpected element queries found in manifest android zip ,unexpected element queries found in manifest android zip file ,unexpected element queries found in manifest application