This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 53054 - AAPT packaging error ignored
Summary: AAPT packaging error ignored
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild (show other bugs)
Version: 7.2 (15.1)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2017-03-04 14:25 UTC by Marek Habersack
Modified: 2017-03-07 11:02 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Marek Habersack 2017-03-04 14:25:15 UTC
This is related to bug #53053

The following AAPT error while packaging the app is ignored by the build:

>  Executing package -f -m -M obj/Debug/android/manifest/AndroidManifest.xml -J /tmp/43fppz1l.96w --custom-package org.grendel.therapyclock -F obj/Debug/android/bin/packaged_resources.bk -S obj/Debug/res/ -S /home/grendel/Projects/personal/TherapyClock/obj/Debug/__library_projects__/Xamarin.Android.Support.Transition/library_project_imports/res -S /home/grendel/Projects/personal/TherapyClock/obj/Debug/__library_projects__/Xamarin.Android.Support.v7.RecyclerView/library_project_imports/res -S /home/grendel/Projects/personal/TestApp/obj/Debug/__library_projects__/Xamarin.Android.Support.v7.AppCompat/library_project_imports/res -S /home/grendel/Projects/personal/TestApp/obj/Debug/__library_projects__/Xamarin.Android.Support.Design/library_project_imports/res -I /home/grendel/android/android-sdk/platforms/android-25/android.jar --extra-packages --auto-add-overlay --no-version-vectors
>		Resources/values/theme.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat'.
>	Done executing task "Aapt"
>	Task "Touch"
>		Using task Touch from Microsoft.Build.Tasks.Touch, Microsoft.Build.Tasks.Core, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Which eventually results in the following build error:

> Errors:
>		TestApp.csproj (SignAndroidPackage) ->
> monodroid/out/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_BuildApkEmbed target) ->
>			monodroid/out/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task BuildApk: obj/Debug/android/bin/packaged_resources does not exist
> Package creation failed

The build should abort when the AAPT error occurs
Comment 2 Jonathan Pryor 2017-03-06 16:12:16 UTC
Hypothesis: it could be due to changes in output from `aapt` between
build-tools 25.0.1 and 25.0.2, where 25.0.1 emits error messages like
`filename:line-number: error...` and 25.0.2 emits error messages like
`filename(line-number): error...`.
Comment 3 dean.ellis 2017-03-07 09:25:44 UTC
PR up
Comment 4 dean.ellis 2017-03-07 11:02:05 UTC
Fixed in Xamarin-android/master/252fa10e

Note You need to log in before you can comment on or make changes to this bug.