Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

No resource found that matches the given name "Theme.AppCompat.Light"



  • hexagodhexagod Member ✭✭✭

    I'm getting the same issue. Trying to compile a sample splash screen just to see what it looks like. I don't understand why the IDE can't sort some of these issues automatically, especially when it comes to dealing with templates. I spend more time fighting with the little errors than I do coding in Xamarin. I still like developing mobile apps in Visual Studio; infact I love it, but this is just a huge time burner lol.. I've tried quite a few of these resolutions and still getting

    Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

  • hexagodhexagod Member ✭✭✭

    So what I did was close the project, install Android SDK 8.0 and 8.1, copy the project folder (with VS not running), open the new .SLN and it's compiling fine now. ... weird because I didn't think that this project was targeting that framework. I did see this

    in the packages.config so I'm assuming monoandroid81 means it needs 8.1 installed to compile.

    these should automatically download if they're required! :)

  • hexagodhexagod Member ✭✭✭

    <package id="Xamarin.Android.Support.v4" version="27.0.2" targetFramework="monoandroid81" /> <package id="Xamarin.Android.Support.v7.AppCompat" version="27.0.2" targetFramework="monoandroid81" /> <package id="Xamarin.Android.Support.Vector.Drawable" version="27.0.2" targetFramework="monoandroid81" />
    *** this should be in the above post mods please condense I can't edit. ***

  • AmroOsama.1516AmroOsama.1516 SAMember ✭✭
    edited August 2018

    I fixed mine by changing the following in styles.xml


    This happened lately after doing some changes, not sure which one though!:

    • Changed the Target Android SDK.
    • Changed the Java Development Kit Location from using Java jdk to using MS OpenJdk.
    • Moved the project folder to another location.
  • I got this error when I changed the name (and namespace) of my Xamarin.Android project outside of Visual Studio.

    I just manually deleted the (DroidProject)\Resources\Resources.Designer.cs file, and then reopened the solution in VS 2017 and rebuilt it. It regenerates that file if your resources change (or if it can't find it), and that fixed it for me.

    Annoying tho, took me ages to figure it out!

  • @UdaraAlwis your suggestion worked it for me. Thanks

  • amirvenusamirvenus USMember ✭✭✭

    Strange but my problem was fixed after cleaning, closing vs, cleaning again and deploying

  • Clean and Rebuild worked for me!!

  • JeroMiyaJeroMiya Member ✭✭

    For those googling this, it's still an issue in the latest Xamarin.Android as of 10/19/2018. I experienced a similar version of this issue after renaming my project file and changing the default namespace of the android csproj. In my case, I did the following:

    • Clean Solution in visual studio
    • deleted bin and obj folder
    • Right click SOLUTION (not just the android project), and click Restore Nuget Packages.

    That last step is what made it work. The build worked fine before my namespace and project name changes, and I think the NuGet cache was tied to that, so I needed to restore NuGet manually (the automatic restore on build did not work fully, apparently). Why it didn't just say "Couldn't find such and such support library dll" instead of these cryptic resource errors, I don't know.

  • I ran into this when I moved a Xamarin solution from an older dev environment to another environment with a fresh VS2017 installation. I fixed it by enabling Auto Install Android SDK's: Tools > Options > Xamarin > Android Settings > Enable Auto Install Android SDKs. Enable this feature, close VS2017 and then (Clean/) Rebuild the solution.

  • RavinaRavina Member

    I really like your blog! Thank you for publishing the blog

  • In my case, I have Visual Studio 15.8.6 and I have updated 15.8.8 and it solved automatically.
    Other Users can see above answers if this not works well.

  • j.kj.k BYMember ✭✭

    @JohnWilson.4976 you saved my day! Your solution worked for me

  • MichelangeloFrancoMichelangeloFranco ITUniversity ✭✭✭

    Update Xamarin.Android.Support.v7.AppCompat to newest version did the fix for me

  • elisatelisat FRMember ✭✭

    I got this error when compiling against a newer target framework (from 8.1 to 9.0) and adding the package Xamarin.Android.Support.v13 solved it.

  • GregHannaGregHanna USMember

    I got this issue when compiling from the command line, but it compiled and run from within Visual Studio (Windows).

    The resolution for me was to use a **newer version of nuget.exe **.

    I downloaded Nuget v5.0 and installed it separately. I used the new version of Nuget to restore all of the packages. Then the msbuild command (which had worked previously) successfully built it.

    This may be related to using a newer version of the Xamarin Android project file. Older project files still compile from the command line. But msbuild did not work with the newer project (created 1 month ago). The packages in Visual Studio References look different in the newer project also.

    The version of Nuget I had been using previously was found under Microsoft Visual Studio\2017\Enterprise\MSBuild\ReadyRoll\OctoPack and was version 3.5
    (I suspect that version 4.x+ is required, related to the reference to msbuild -t:restore on the "package-restore" page in Microsoft Docs - it won't let me post the link).

  • I had the same issue. I am working with some friends and have just received the updates files. I don't know why, but I fixed this issue by updating some texts in my new files that were wrong and saving them (Ctrl + S **and **Crlt + Shift + S). I was almost giving up and when I decided to correct some txts in 2 files when I said to myself: "let's try one last time" and finally it worked for me. I suggest you to try this before delete something or update your SDK version.

  • CoderCoder USMember ✭✭
    edited January 2

    In my case, I just used "android:" prefix then rebuild the project and it went just fine!
    <item name="android:windowNoTitle">true</item>
    instead of
    <item name="windowNoTitle">true</item>

Sign In or Register to comment.