"aapt.exe"退出,代码-1073741819

问题描述:

我刚刚安装了Xamarin Studio和Xamarin for visual Studio 2015(试用版).所有版本都是最新的稳定版本.我从一个新的android项目开始,但是构建不会成功.我检查了谷歌,这似乎是一个经常性的问题.我也更新了所有SDK工具.其中一个博客说要从系统中卸载并重新安装xamarin的所有内容.也做到了.但是绝对没有用.问题还是一样.

I just installed Xamarin Studio and Xamarin for visual studio 2015- trial version. All versions are the latest stable versions. I start with a new android project, but when the build won't succeed. I checked google, and it seems like a recurring problem. I've all my sdk tools updated as well. One of the blogs said to uninstall and reinstall everything xamarin from system. Did that as well. But to absolutely no avail. The problem is still the same.

在xamarin论坛上,已经存在类似的问题:

on xamarin forum, a similar question is already there: http://forums.xamarin.com/discussion/11311/build-fails-on-android-projects-appt-exe-exited-with-code-1073741816 But it's still not properly answered. Here's my build output from visual studio with verbose mode on.

[ https://docs.google. com/document/d/1Ue0o4YiYeegxLoWep-yTrUJQFIC90G24CTZYztIPXC4/edit?usp = sharing](构建 Visual Studio的输出(启用详细模式))

[https://docs.google.com/document/d/1Ue0o4YiYeegxLoWep-yTrUJQFIC90G24CTZYztIPXC4/edit?usp=sharing](Build Output from visual studio (verbose mode on) )

该问题似乎与MSBuild配置参数配置错误或未配置有关.不确定,但我相信这与 _UpdateAndroidResgen 有关.

The problem looks to be related to MSBuild configuration params misconfigured or not-configured. Not sure but i believe it is something related to _UpdateAndroidResgen .

当我通过具有管理员权限的cmd运行此命令时,我得到了:

When I run this command from cmd with adminsitrator priviliges, I get this:

C:\ Users \ Pratik \ AppData \ Local \ Android \ android-sdk \ build-tools \ 21.0.1 \ aapt.exe 软件包-f -m -M C:\ Users \ Pratik \ AppData \ Local \ Temp \ kantu3nz.kia \ AndroidManifest.xml -J C:\ Users \ Pratik \ AppData \ Local \ Temp \ kantu3nz.kia --custom-package app1.app1 -F C:\ Users \ Pratik \ AppData \ Local \ Temp \ kantu3nz.kia \ resources.apk.bk -S C:\ AndroidProjects \ App1 \ App1 \ obj \ Debug \ res -I C:\ Users \ Pratik \ AppData \ Local \ Android \ android-sdk \ platforms \ android-21 \ android.jar --auto-add-overlay

C:\Users\Pratik\AppData\Local\Android\android-sdk\build-tools\21.0.1\aapt.exe package -f -m -M C:\Users\Pratik\AppData\Local\Temp\kantu3nz.kia\AndroidManifest.xml -J C:\Users\Pratik\AppData\Local\Temp\kantu3nz.kia --custom-package app1.app1 -F C:\Users\Pratik\AppData\Local\Temp\kantu3nz.kia\resources.apk.bk -S C:\AndroidProjects\App1\App1\obj\Debug\res -I C:\Users\Pratik\AppData\Local\Android\android-sdk\platforms\android-21\android.jar --auto-add-overlay

aapt.exe崩溃,并且在尝试调试时,它显示AccessViolationException.

aapt.exe crashes, and when trying to debug, it shows AccessViolationException.

任何相关建议都将受到高度赞赏.

Any relevant suggestions are highly appreciated.

谢谢.

正如问题中已经提到的,重新安装Xamarin的所有内容也无法正常工作.卸载Visual Studio 2015即可.以下步骤可以解决问题(至少对我而言):

As already mentioned in the question, re-installing everything Xamarin also did not work. Uninstalling visual studio 2015 worked. The following steps did the trick (for me, at least):

1)卸载Visual Studio 2015 Beta.

1) Uninstall visual studio 2015 beta.

2)卸载Xamarin for Visual Studio.

2) Uninstall Xamarin for visual studio.

3)重新启动系统.

4)重新安装Xamarin Studio.现在,可以同时使用Xamarin Studio和VS2013进行编译.

4) Re-install Xamarin studio. Now, the compiles with both Xamarin studio as well as VS2013.

PS:这是这些最后解决方案之一.始终欢迎任何更好,更准确的答案.

PS: This is one of those last-resort solutions. Any better and more accurate answers are always welcome.