Bug 53054 - AAPT packaging error ignored
Summary: AAPT packaging error ignored
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

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 android.support.graphics.drawable.animated:android.support.compat:android.support.coreui:android.support.coreutils:android.support.design:android.support.fragment:android.support.mediacompat:android.support.transition:android.support.graphics.drawable:android.support.v7.appcompat:android.support.v7.recyclerview --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 https://github.com/xamarin/xamarin-android/pull/471
Comment 4 dean.ellis 2017-03-07 11:02:05 UTC
Fixed in Xamarin-android/master/252fa10e