I recently reinstalled Xamarin after the install of Win10 on my computer.
As always, installing Xamarin and launching a basic Xamarin.Forms app won't work, you need to get some troubles and here are mine :
No resource found that matches the given name: attr 'windowNoTitle'.
No resource found that matches the given name: attr 'colorPrimary'.
No resource found that matches the given name: attr 'windowActionBar'.
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. No resource found that matches the given name: attr 'colorPrimaryDark'.
No resource found that matches the given name: attr 'colorAccent'.
No resource found that matches the given name: attr 'colorAccent'.
No resource found that matches the given name: attr 'windowActionModeOverlay'. Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.
I've read several topics that said you need to change the min SDK version to this:
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="23" />
and have all packets up to date in Android SDK Manager (it's the case too).
But I still get the errors.
Any hint what to change in order to get my basic app working?
EDIT styles.xml exists and looks like :
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
[...]
Ok, got it after many tries, so what to do:
Visual Studio:
Tools > Options > Xamarin > Android Settings
: Change to JDK 1.8 (instead of 1.7) !Changing to JDK 1.8 will permanently avoid the error
Unsupported major.minor version 52.0
Windows (Local):
Xamarin.Android.*
folders in C:\Users\<User>\AppData\Local\Xamarin
zips
folder in the same locationWindows (in my project folder):
.vs
folder Xamarin.Android.*
folders in packages
folder/obj
and /bin
folder in the .Droid projectReopen Visual Studio and rebuild your solution.
On first compile, be patient! Zips are downloaded again in Xamarin/zips
and extracted (take at least 5 minutes on my computer).
Wait ... Wait ...
And it's okay, solution is deployed on my smartphone and everything works fine. Thanks to all.
Hope it will help someone else!
i had this issue when i copied the project to another directory
i resolved it by deleting the .vs
folder and project.sln.dotsettings.user
file and deleted obj
and bin
folder in .android
folder.
Xamarin is great - but that issues are annoying. Please try this:
First solution:
- Remove and install again the following library Xamarin.Android.Support.v7.AppCompat
Second solution:
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With