(Resolved) unexpected element <queries> found in <manifest>

// Expert user has replied. //Solved
A Azam Murtuza Hussain 1 year 7 months ago
122 4 3

Hello,

After deploying android 11 on device ( CC600), we are not able to connect with scanner. I have latest XamarinEMDK (8.0.0.2) and also updated the AndroidManifest.xml file to include the following as per the developer’s guide :

<uses-permission>

    <queries>

      <package android:name="com.zebra.zebracontentprovider" />

      <package android:name="com.symbol.dataanalytics" />

      <package android:name="com.symbol.emdk.emdkservice" />

    </queries>   

  </uses-permission>

 

This is the compile time error I am getting when I include the above in manifest  file : unexpected element <queries> found in <manifest><uses-permission>

My IDE is : Visual Studio 2019.

 

Any help is greatly appreciated

Please Register or Login to post a reply

Accepted Solution

A Azam Murtuza Hussain

Thanks Afred,

I updated the build tools version and made the following changes to my manifest file and it is all working now. Thanks for all your help.

  <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="30" />

  <queries>
    <package android:name="com.zebra.zebracontentprovider" />
    <package android:name="com.symbol.dataanalytics" />
    <package android:name="com.symbol.emdk.emdkservice" />
  </queries>
  <uses-permission android:name="com.symbol.emdk.permission.EMDK" />
  <uses-permission android:name="com.symbol.emdk.permission.emdkservice" />
  
  <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
 
 

 

 

4 Replies

A Alfred Teixeira

Hello,

I have included some links to articles that should help you resolve this issue:

https://stackoverflow.com/questions/62969917/how-can-i-fix-unexpected-element-queries-found-in-manifest-error

https://www.youtube.com/watch?v=dLPebj4odIc

 

Regards,

 

Al

A Azam Murtuza Hussain

Thanks for your response Al,

I am using visual studio(2019) Xamarin.Android. 

and I don't see any reference of graddle for my project.  any .net Xamarin specific link?

 

A Alfred Teixeira

Hello Azam,

I have some questions for you regarding this issue:

1) Are you specifically targeting Android 11 in your project? 

2) Have you installed the latest SDK versions on your development PC to support Android 11?                                                                    a) You will need to update the corresponding build tool versions.

3) If not done yet, apply upgrades your Visual Studio 2019 if available.                                                                                                          a) Confirm the XamarinAndroidSDK supports the targeted API level.  

note: Android 11 introduced <queries> as a manifest element.

 

Regards,

AT

A Azam Murtuza Hussain

Thanks Afred,

I updated the build tools version and made the following changes to my manifest file and it is all working now. Thanks for all your help.

  <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="30" />

  <queries>
    <package android:name="com.zebra.zebracontentprovider" />
    <package android:name="com.symbol.dataanalytics" />
    <package android:name="com.symbol.emdk.emdkservice" />
  </queries>
  <uses-permission android:name="com.symbol.emdk.permission.EMDK" />
  <uses-permission android:name="com.symbol.emdk.permission.emdkservice" />
  
  <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
 
 

 

 

CONTACT
Can’t find what you’re looking for?