question

ShantimohanElchuri-8757 avatar image
0 Votes"
ShantimohanElchuri-8757 asked RobCaplan edited

In Xamarin Forms Android run, what is this "error APT1000: Found tag id where item is expected"?

I am getting this error in a Xamarin.Forms' Android project when run.

Emulator pixel_3a_xl_q_10_0_-_api_29 is running.
1>E:\XPA\my_solution\my_project\my_project.Android\obj\Debug\100\lp\68\jl\res\values\values.xml(4): error APT1000: Found tag id where item is expected


The contents of that file are:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<id name="view_tree_saved_state_registry_owner"/>
</resources>


I don't find this file in another project that was also targeting Android 10.

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JessieZhang-2116 avatar image
0 Votes"
JessieZhang-2116 answered JessieZhang-2116 commented

Hello,


Welcome to our Microsoft Q&A platform!

You can try to enable aapt2 on your Android project, then Clean and rebuild your project. Just as follows:

86762-image.png


Update

I found there are two application tags in your AndroidManifest.xml file, try to remove one.
When I changed your code into the following code, it could run properly on my device.
The whole AndroidManifest.xml is :

     <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.esmsmartsolutions.ToDoPlus" android:installLocation="auto">
     <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
 <application android:label="ToDoPlus" android:theme="@style/MainTheme"></application>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_CONTACTS" />
     <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.INTERNET" />
     <!--<application android:label="ToDoPlus">
         <activity android:name="microsoft.identity.client.BrowserTabActivity">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
                 <data android:scheme="msauth" android:host="com.esmsmartsolutions.ToDoPlus" />
             </intent-filter>
         </activity>
     </application>-->
 </manifest>

The result is:

94424-image.png

Note:I noticed you haven't include some classes into your app( Models and Services).


Best Regards,

Jessie Zhang


If the response is helpful, please click "Accept Answer" and upvote it.


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (41.1 KiB)
image.png (17.3 KiB)
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

After making the suggested option, my Android Options settings are:

88597-01-android-options-screen-1.png

Then I am getting the error:

XA0130: Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher.

The minimum Android version setting is 5.0 as shown below:

88598-02-minimum-android-ver-setting.png

But still I disabled the Fast Deployment options as shown below:

88599-03-fastdeployment-disabled.png

Rebuilt & deployed but got the error as shown in the next comment (as it exceeds 1000 characters)...

0 Votes 0 ·

... ... Continued from the previous comment:

The error now is:

ADB0020: Android ABI mismatch. You are deploying an app supporting 'armeabi-v7a;arm64-v8a' ABIs to an incompatible device of ABI 'x86'. You should either create an emulator matching one of your app's ABIs or add 'x86' to the list of ABIs your app builds for.

But I have included x86 in the Supported Architecture settings as shown below:

88510-04-supported-architectures-settings.png


This suggests that the problem is something else and not what is indicated. All this is happening only after upgrading to XF 5.0. My projects upgrade to XF 5.x is not smooth at all.

Any suggestions?


0 Votes 0 ·
JessieZhang-2116 avatar image JessieZhang-2116 ShantimohanElchuri-8757 ·

Could you please post a basic demo to github or onedriver so that we can test on our side?

0 Votes 0 ·

Yes, I like to. But it is not simple. Let me work on it.

0 Votes 0 ·
Show more comments