简体   繁体   中英

No AndroidManifest.xml found - Xamarin

This is very interesting scenario which i have been facing from last few days.I have a Xamarin project which is using MvvmCross and few 3rd party libraries like RestSharp. Few days back when i got project code and open it i found it abnormal that project property folder has more then 1 manifest files.When i tried to run project the visual studio was not picking up android manifest file. I search on internet about this and got few clues.

  • Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory.

i am posting my file structure image for reference.i have checked my .csproj file it has following code

 <AndroidManifest>Properties\TurboViewerarmAndroidManifest.xml</AndroidManifest>
<ItemGroup>
<Content Include="Properties\TurboViewerarmAndroidManifest.xml">
  <SubType>Designer</SubType>
</Content>

As far as my concern if i change the manifest file name to AndroidManifest.xml the project runs fine but the problem occurs when i try to change name of other manifest file to AndroidManifest.xml because we can not have many files with same name in single folder.But for this project all the manifest files will be in same folder but project will not run without changing their name to AndroidManifest.xml.Its like a deadlock.

文件结构

包含所有清单文件的文件夹

As i am new to visual studio and xamarin so i might be missing some point that probably will make everything clear.

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory.

That's your issue - your Android manifest file is called TurboViewerarmAndroidManifest.xml . Rename it to AndroidManifest.xml .

Just trying to do very same for a white-label app. Visual Studio ignores the AndroidManifest setting so you cannot rename the file (at the moment). This is an already known issue: https://bugzilla.xamarin.com/show_bug.cgi?id=31306

Even a pre-build process doesn't work since it always throws an error that the manifest file is missing (but it's there).

My solution for now: rename the manifest before building the project manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM