Corrado's Blog 2.0

Online thoughts of a technology funatic

Fix Xamarin Form compilation errors

I’ve recentily repaved my development machine and installed Visual Studio 2017 adding nearly all features including, of course, Xamarin and all subsequent updates.
Today I’ve tried to create a blank new Xamarin Forms project targeting .Net Standard for the common part but as soon as I tried to compile it I got a strange sequence of errors on Android project:

error APT0000: 1: error: Error retrieving parent for item: No resource found that matches the given name ‘Theme.AppCompat.Light.Dark
error APT0000: 2: error: Error: No resource found that matches the given name: attr ‘colorAccent’.
error APT0000: 1: error: Error: No resource found that matches the given name: attr ‘colorPrimary’.
error APT0000: 1: error: Error: No resource found that matches the given name: attr ‘colorPrimaryDark’.
error APT0000: 1: error: Error: No resource found that matches the given name: attr ‘windowActionBar’.
error APT0000: 3: error: Error: No resource found that matches the given name: attr ‘windowActionModeOverlay’.
error APT0000: 1: error: Error: No resource found that matches the given name: attr ‘windowNoTitle’.
error APT0000: 3: error: Error retrieving parent for item: No resource found that matches the given name ‘Theme.AppCompat.Light.Dial
error APT0000: 3: error: Error: No resource found that matches the given name: attr ‘colorAccent’.

Totally nonsense for me.
After a chat with my friend Laurent we’ve discovered that problem depends on missing installation of Android SDK 24 (Nugat 7.0) after installing it using the new SDK Manager (via Tools->Android->Android SDK manager) problem was gone.

Cause probably depends on referenced packaged used in default templates that no longer support Android Marshmallow (6.0) the version that gets installed by default by Visual Studio.

No Responses to “Fix Xamarin Form compilation errors”

RSS feed for comments on this post. TrackBack URL

Leave a Response