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.
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error XA0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: Could not find SDK platform directory 'C:\Users\Lasse\AppData\Local\Android\android-sdk\platforms\android-14'. Are --sdk-dir and --sdk-version set appropriately? (XA0000) (AndroidBeamDemo)
$(TargetFrameworkVersion) is not the only relevant API level value. What is also used is the //uses-sdk/@android:targetSdkVersion attribute value within AndroidManifest.xml, which -- if present -- overrides the $(TargetFrameworkVersion) value when building the .apk, so that e.g. Android resources can be found.
Occasionally the targetSdkVersion attribute will need to be set, e.g. Google Play Services often requires targetSdkVersion be set to the latest-and-greatest to make use of new Android resources, while you will often instead want $(TargetFrameworkVersion) to match your minSdkVersion (to ensure your app runs on your minimum supported target).
Please check your Properties\AndroidManifest.xml file and ensure it isn't setting targetSdkVersion to 14.
Marking this RESOLVED ANSWERED due to comments in https://bugzilla.xamarin.com/show_bug.cgi?id=26897#c1
Please feel free to reopen this bug if this is still an issue.