[英]Error when creating Xamarin.Android project in VS 2015
I created new android project and, after building it, got error: "aapt.exe" exited with code -1073741819 and "obj\\Debug\\android\\bin\\packaged_resources" do not exist. 我创建了一个新的android项目,并在构建后出现错误:“ aapt.exe”以代码-1073741819退出,并且“ obj \\ Debug \\ android \\ bin \\ packaged_resources”不存在。 I really don't know what to do, because i didn't even do anything, just created it. 我真的不知道该怎么办,因为我什至没有做任何事情,只是创建了它。 I reinstalled everything, even xamarin for vs and android SDK. 我重新安装了所有内容,甚至xamarin for vs和android SDK。 Still have the same problem. 仍然有同样的问题。
There can be few reasons for this error. 发生此错误的原因很少。
First ensure that you have not added any files to the resources folder. 首先,请确保您尚未将任何文件添加到资源文件夹。 You have mentioned its a brand new project and , so I assume , you have not. 您已经提到了它是一个全新的项目,所以我想您还没有。 But in case, please ensure to remove the hyphen from the files names. 但是,以防万一,请确保从文件名中删除连字符。
Please update to the latest version on Xamarin. 请更新到Xamarin的最新版本。 Goto Tools menu -> Options -> Xamarin -> Other -> Click on "check updates" and ensure the latest Xamarin sdk has been installed. 转到工具菜单->选项-> Xamarin->其他->单击“检查更新”,并确保已安装最新的Xamarin sdk。
Now ensure all the android component are installed. 现在确保已安装所有android组件。 Again , Tools -> Options -> Xamarin -> Android Settings and ensure that JDK, SDK and NDK are correctly set and they have a green tick mark. 再次单击工具->选项-> Xamarin-> Android设置,并确保正确设置了JDK,SDK和NDK,并且它们具有绿色的勾号。
Finally Tools -> Android -> Android SDK Manager, and ensure that the Android SDK Platform has been installed for the API level that you targetting. 最后,单击工具-> Android-> Android SDK管理器,并确保已为您定位的API级别安装了Android SDK平台。 (this is more of a sanity check). (这更多是一个健全性检查)。
Hope that works for you. 希望对您有用。
我认为您已经在“可绘制”文件夹中用“-”创建/重命名了任何文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.