Visual Studio 2019 Cannot Find AndroidManifest.xml

Nathan Sokalski 4,111 Reputation points
2021-08-11T20:15:51.553+00:00

When I double-click Properties in the Solution Explorer of my Xamarin.Android app and go to the Android Manifest section, it says:

Manifest path:
No AndroidManifest.xml found. Click to add one.

I have an AndroidManifest.xml file, it is listed in Solution Explorer under Properties, included in the Project, and I can open it. I can even build the Project. If I click the Click to add one message, an AndroidManifest.xml file is displayed in the Android Manifest section (I don't know if it is the existing one or the new one, since they have the same name, content, and location). However, once I close Visual Studio 2019 & reopen it (even if I click Save All), it forgets about the file again, even though it is still there just like I described before. Is there something I need to do manually to make it remember the file (I would have thought "Click to add one" would do this, but I could be wrong)? Thanks.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,370 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Stanislav Ilchenko 21 Reputation points
    2023-01-06T17:03:43.667+00:00

    Hello. I had the same issue. I fixed it in next way:

    • Open android project (.csproj) file in text editor
    • Search for all <AndroidManifest> elements
    • Fill empty elements. For example <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    3 people found this answer helpful.
    0 comments No comments

  2. JarvanZhang 23,961 Reputation points
    2021-08-12T07:17:19.153+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Manifest path: No AndroidManifest.xml found. Click to add one.

    This seems to be a display problem with VisualStudio. When opening a Xamarin.Android project in VS and going to the Android Manifest section, the problem will occur. Please click Build -> Build Solution to build the project, then close and reopen the Properties page, the configuration page will be shown correctly.

    This is an issue with VisualStudio, you coud report Visual Studio problem is via Visual Studio's 'Report a Problem' menu and then follow them on the developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Learn

    Best Regards,

    Jarvan 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.