Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 7207 [details]
repro component sample
This is a regression from 4.12.5, the attached sample no longer builds against 4.14 / b5c14449.
Diagnostic build output:
Steps to reproduce:
1. Download and unzip the attachment
2. xbuild /t:SignAndroidPackage legacybar-2.0/samples/LegacyBar/LegacyBar.Sample/LegacyBar.Sample.csproj
XA 4.14-series / b5c14449
Disregard the link to the sample in comment 0, please download from the attachments section.
The problem caused by Bug #19748, which requests that we use `aapt --max-res-version N`, N being the API level corresponding to $(TargetFrameworkVersion), which in this case is 8:
> Tool /Users/petercollins/Library/Developer/Xamarin/android-sdk-mac_x86/build-tools/20.0.0/aapt execution started with arguments:
> --max-res-version 8
This also explains the aapt warnings:
> max res 8, skipping menu-v11
> max res 8, skipping values-v11
> max res 8, skipping values-v14
...and the errors:
> obj/Debug/android/AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'theme' with value '@style/MyTheme').
The MyTheme theme is only defined for API-11 and API-14:
$ grep -rl MyTheme Resources/
The question is thus, what should we do, as this is a regression from 4.12.
1. We could document the change and keep the new behavior.
2. We could revert the change.
3. We could make it "opt-in", and only specify --max-res-version if $(AndroidAaptUseMaxVersion) is True.
4. We could fix the sample, by changing $(TargetFrameworkVersion) to be >= API-11, though this introduces different errors:
> FragmentTabActivity.cs(100,34): error CS0104: `Fragment' is an ambiguous reference between `Android.App.Fragment' and `Android.Support.V4.App.Fragment'
Safest is probably (3), though that means yet another "knob" to control behavior and complicate our tests, so I don't particularly like that idea...
After some deliberation, I think we'll want to go with solution #3 here.
Fixed in monodroid/71ad690f.
Fixed in monodroid-4.14-series/3b3333bd.
The problem is that I misunderstood the context of the problem.
The problem isn't that `aapt --max-res-version N` is being used; this
is required in order to fix other bugs.
The problem is that the wrong N was being used! It needs to be the N
that corresponds to the android.jar that is used when invoking javac,
which starts with $(TargetFrameworkVersion) but can be OVERRIDDEN in
The REAL problem is that the AndroidManifest.xml override wasn't being
used to determine the target SDK version, only
Fixed in master/5809e71f and monodroid-4.14-series/c8b833b0 by using AndroidManifest.xml //uses-sdk/@android:targetSdkVersion to control the `aapt --max-res-version N` value.
We have checked this issue. Now attached sample "LegacyBar component" is building and running successfully without any error. Screencast: http://screencast.com/t/7yqZ5X7t
=== Xamarin Studio ===
Version 5.2 (build 179)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Mono 3.6.0 ((no/5ff701f)
GTK+ 2.24.23 (Raleigh theme)
Package version: 306000037
=== Apple Developer Tools ===
Xcode 5.1.1 (5085)
=== Xamarin.iOS ===
Version: 126.96.36.199 (Business Edition)
Build date: 2014-07-03 15:53:37-0400
=== Xamarin.Android ===
Version: 4.14.0 (Business Edition)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
=== Xamarin.Mac ===
=== Build Information ===
Release ID: 502000179
Git revision: 3dbcdf64de0826aa76b5f108ae80644511b4e587
Build date: 2014-07-03 17:37:41-04
Xamarin addins: 116ce67c67d933645f95fb370690487b18b8624e
=== Operating System ===
Mac OS X 10.8.4
Darwin Tajinders-iMac.local 12.4.2 Darwin Kernel Version 12.4.2
Mon Jun 17 18:00:12 PDT 2013
Hence, I am closing this issue.