简体   繁体   English

找不到AndroidManifest.xml-Xamarin

[英]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. 这是最近几天我一直面对的非常有趣的场景。我有一个Xamarin项目,该项目使用MvvmCross和一些诸如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. 几天前,当我获得项目代码并打开它时,我发现项目属性文件夹中包含1个以上的清单文件是不正常的。当我尝试运行项目时,Visual Studio没有拾取android清单文件。 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. 每个应用程序的根目录中都必须有一个AndroidManifest.xml文件(确切地说是该名称)。

i am posting my file structure image for reference.i have checked my .csproj file it has following code 我正在发布我的文件结构图像以供参考。我已经检查了我的.csproj文件,它具有以下代码

 <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. 就我的担心,如果我将清单文件名更改为AndroidManifest.xml,则项目可以正常运行,但是当我尝试将其他清单文件的名称更改为AndroidManifest.xml时,会出现问题,因为单个文件中不能包含多个同名文件文件夹,但是对于此项目,所有清单文件都将位于同一文件夹中,但是如果不将其名称更改为AndroidManifest.xml,则项目将无法运行,就像死锁一样。

文件结构

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

As i am new to visual studio and xamarin so i might be missing some point that probably will make everything clear. 由于我是Visual Studio和Xamarin的新手,因此我可能会遗漏一些可能使所有事情变得清晰的要点。

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. 每个应用程序的根目录中都必须有一个AndroidManifest.xml文件(确切地说是该名称)。

That's your issue - your Android manifest file is called TurboViewerarmAndroidManifest.xml . 这就是您的问题-您的Android清单文件称为TurboViewerarmAndroidManifest.xml Rename it to AndroidManifest.xml . 将其重命名为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). Visual Studio会忽略AndroidManifest设置,因此您目前无法重命名该文件。 This is an already known issue: https://bugzilla.xamarin.com/show_bug.cgi?id=31306 这是一个已知的问题: 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. 我现在的解决方案是:在手动构建项目之前重命名清单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin.Forms GoogleMaps -: '未找到 API 密钥。 检查 ... 是 AndroidManifest.xml 的一个元素 - Xamarin.Forms GoogleMaps - : 'API key not found. check that … is an element of AndroidManifest.xml 如何从Xamarin.Froms中的AndroidManifest.xml访问元数据 - How to access metadata from AndroidManifest.xml in Xamarin.Froms 在Xamarin Android中,AssemblyInfo.cs与AndroidManifest.xml有什么关系? - In Xamarin Android how is AssemblyInfo.cs related to AndroidManifest.xml? Xamarin发布模式失败,虽然调试模式工作(AndroidManifest.xml中已经添加了INTERNET_PERMISSION) - Xamarin release mode failed although debug mode work (Already added INTERNET_PERMISSION in AndroidManifest.xml) 如何保存AndroidManifest.xml文件Unity? - How to save AndroidManifest.xml file Unity? 我的Unity项目上没有AndroidManifest.xml - No AndroidManifest.xml on my Unity project 合并多个AndroidManifest.xml时出现问题 - Problems merging multiple AndroidManifest.xml 默认 MAUI 项目中不存在 AndroidManifest.xml 文件 - AndroidManifest.xml file doesn't exist in default MAUI project AndroidManifest.xml在构建时不会合并活动信息 - AndroidManifest.xml does not merge activity info upon Build 删除后,AndroidManifest.xml中的C#行会重新出现 - C# Line in AndroidManifest.xml reapears after deleteing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM