locked
Any idea with this topic <item> inner element must either be a resource reference or empty? RRS feed

  • Question

  • User148620 posted

    I've been facing this issue for a while in VS for Windows:

    Resources\values\values.xml(2): error APT0000: inner element must either be a resource reference or empty.

    But it tells me nothing about what is and I have even checked each and every library that I have available and none of them has any ID as it's suggested in some forums and I don't have anything in my strings or other files.

    Sunday, July 7, 2019 7:54 AM

All replies

  • User369979 posted

    It seems the values.xml causes this issue. Did you define that file in the values folder? Please check the items there, make sure none of them has declared id as this thread discusses: https://stackoverflow.com/questions/52076491/android-inner-element-must-either-be-a-resource-reference-or-empty

    Monday, July 8, 2019 10:00 AM
  • User148620 posted

    @LandLu said: It seems the values.xml causes this issue. Did you define that file in the values folder? Please check the items there, make sure none of them has declared id as this thread discusses: https://stackoverflow.com/questions/52076491/android-inner-element-must-either-be-a-resource-reference-or-empty

    Nope, I don't have that folder at all.

    Monday, July 8, 2019 5:32 PM
  • User369979 posted

    @FedericoNavarrete Can you reproduce it on a new blank project? Or it only occurs on this specific app?

    Tuesday, July 9, 2019 9:03 AM
  • User148620 posted

    @LandLu said: @FedericoNavarrete Can you reproduce it on a new blank project? Or it only occurs on this specific app?

    It has been happening only in this app and Visual Studio 2019 for Windows in Visual Studio 2019 for Mac is working properly.

    Tuesday, July 9, 2019 9:41 AM
  • User369979 posted

    Have tried to clean all the xml files in the values folder and create them again? It seems some error files may persist in your values folder. Please check it in your project.

    Tuesday, July 9, 2019 10:07 AM
  • User148620 posted

    @LandLu said: Have tried to clean all the xml files in the values folder and create them again? It seems some error files may persist in your values folder. Please check it in your project.

    I constantly delete the bin and obj when I run with this issues.

    Tuesday, July 9, 2019 10:09 AM
  • User369979 posted

    Not only the bin and obj but also Reset your values folder in your project. Move all the xml files to somewhere else. Delete them in VS too. And then add them again.

    Tuesday, July 9, 2019 10:13 AM
  • User148620 posted

    @LandLu said: Not only the bin and obj but also Reset your values folder in your project. Move all the xml files to somewhere else. Delete them in VS too. And then add them again.

    As I said, if it works in MacOS then it's an issue of Windows because it doesn't make sense that in one VS works and not the other one. How do I know it? Because I have both.

    Tuesday, July 9, 2019 10:25 AM
  • User148620 posted

    @LandLu said: Not only the bin and obj but also Reset your values folder in your project. Move all the xml files to somewhere else. Delete them in VS too. And then add them again.

    By the way, the issue expanded to Visual Studio for Mac 2019 in the latest preview.

    Tuesday, July 9, 2019 8:33 PM
  • User369979 posted

    If it had different results on different IDE. Try to open a support ticket here: https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6.

    Wednesday, July 10, 2019 8:38 AM
  • User148620 posted

    @LandLu said: If it had different results on different IDE. Try to open a support ticket here: https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6.

    I have already like 2 or 3 tickets about this and provided a copy of my project because nowadays, it seems that Xamarin.Android is becoming quite unstable in each new release of VS 2019.

    Wednesday, July 10, 2019 8:39 AM
  • User369979 posted

    @FedericoNavarrete I've seen you posting an issue on GitHub: https://github.com/xamarin/xamarin-android/issues/3376. Our engineer will confirm your issues there. You could track it for the latest response.

    For preview technologies, the https://developercommunity.visualstudio.com/topics/xamarin.html forums is also a good choice. Those are actively tracked, and it looks like several of the problems you've posted there have fixes checked in.

    If you need help with released versions and would like one-on-one help then you can open an assisted support case at https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6 and somebody will work with you directly.

    Wednesday, August 7, 2019 8:03 AM
  • User2223 posted

    I had the same problem, the workaround purposed in the last answer to this post worked for me, even with version 16.3.8 of VS 2019

    For Visual Studio 2019 version 16.2 Preview 3, you could work around this error for now by going back to using AAPT. To do that, you would check and then re-uncheck the Use incremental packaging system (aapt2) setting in the Visual Studio project property pages, and save the changes.

    Wednesday, November 6, 2019 7:37 AM