5
votes

I just create a project and wanna build and run this in my Android phone.

Here is Normal detail of my project Output. I did not put space and dash in any of my file. while error error MSB6006: "aapt.exe" exited with code -1073741819. Display

C:\Users\DeviceBee SAQE\AppData\Local\Android\android-sdk\build-tools\21.0.1\aapt.exe
  package -f -m -M "C:\Users\DeviceBee SAQE\AppData\Local\Temp\mwyidlg1.uvy
 \AndroidManifest.xml" -J "C:\Users\DeviceBee SAQE\AppData\Local\Temp\mwyidlg1.uvy" 
 --custom-package app1.app1 -F "C:\Users\DeviceBee SAQE\AppData\Local\Temp\mwyidlg1.uvy
  \resources.apk.bk" -S obj\Debug\res -I "C:\Users\DeviceBee SAQE\AppData\Local\Android
  \android-sdk\platforms\android-12\android.jar" --auto-add-overlay --max-res-version
   12 

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(783,2): error MSB6006: "aapt.exe" exited with code -1073741819.

2
Did you do some google research for "MSB6006 exited with code -1073741819"?Tomáš Knopp
Yes I did. I got solution just once. But I found again that problem and the last solution isn't working.Arsal
@Arsal You can swap channel using this tutorial: developer.xamarin.com/recipes/cross-platform/ide/…matthewrdev
I think this is the issue with the latest beta Xamarin.Android. It manifests when 3rd party assemblies are referenced (possible when those are based on jars). Bugzilled issue 24409 [bugzilla.xamarin.com/show_bug.cgi?id=24488]Miha Markic
After Xamarin Updating through Beta swapping I am able to get rid of that bloody Error :) THANK you GuysArsal

2 Answers

2
votes

Adding TechNote link - Remove SDK 24 using the Android SDK Manager is the solution as noted by @ali. Technote on this exact issue here - https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/ . Totally removing "24" from my machine cleared it. Just changing targets did not.

1
votes

I have some problem ,after this, i read output error see this:

   I:\Program Files\Android\android-sdk\build-tools\24.0.0-preview\aapt.exe package -f -m -M obj\Debug\android\manifest\AndroidManifest.xml -J "C:\Users\Ali Visual Studio\AppData\Local\Temp\5q0cnsx0.m3e" --custom-package app3.app3 -F obj\Debug\android\bin\packaged_resources.bk -S obj\Debug\res -I "I:\Program Files\Android\android-sdk\platforms\android-10\android.jar" --auto-add-overlay --max-res-version 10  (TaskId:200)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1698,3): error MSB6006: "aapt.exe" exited with code -1073741819.
1>Done executing task "Aapt". (TaskId:200)
1>Task "Touch" (TaskId:201)
1>  Task Parameter:Files=obj\Debug\android\bin\packaged_resources (TaskId:201)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1724,3): error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist.
1>Done executing task "Touch" -- FAILED. (TaskId:201)
1>Done building target "_CreateBaseApk" in project "App3.csproj" -- FAILED.: (TargetId:130)

Ok this line is my problem:

I:\Program Files\Android\android-sdk\build-tools\24.0.0-preview\aapt.exe

go to your your android build-tools installed path and check your build-tools versions, you can update build-tools from Android SDK Manager or remove version if has error, i have build-tools 23.0.1 and 23.0.2 and 24.0.0-preview (default build version is latest 24.0.0-preview) i removed 24.0.0-preview folder and rebuild my project and it's works.