Forum Visual Studio
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.

error in splash screen

Hello
In my app in xamarin studio add splash screen by document that is in your site, but when build app throw this error:
Error: No resource found that matches the given name (at 'android:windowBackground' with value '@drawable/Icon').

my app exactly similar to sample app in xamarin site and every image that i add to resource again this error accured.
please guide me.
thanks

Answers

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭
    edited May 2013

    Hi Elias,
    I suspect that you have a mismatch between the name of your splash image and how you're referring to it in Styles.xml.

    From your message, I suspect that your Styles.xml file refers to @drawable/icon, rather than @drawable/splash as below:

    <resources>
      <style name="Theme.Splash" parent="android:Theme">
       <item name="android:windowBackground">@drawable/icon</item>
       <item name="android:windowNoTitle">true</item>
      </style>
    </resources>
    

    If you loaded the splash image with a name of splash.png in the drawable folder, then you need Styles.xml to be:

    <resources>
      <style name="Theme.Splash" parent="android:Theme">
       <item name="android:windowBackground">@drawable/splash</item>
       <item name="android:windowNoTitle">true</item>
      </style>
    </resources>
    

    It would be useful if you could post the contents of your Styles.xml file for us to see.

    James

    PS - This is better posted in the Android forum, not the Xamarin Studio forum by the way!

  • XamatteoXamatteo USMember

    I had the same problem.
    Solved using lowercase in the name of the drawable

  • BeXamarinBeXamarin INMember

    I have same issue, i am posting an image which showing my code, please help me to let me know that where I am wrong?

  • JLMPJLMP USMember

    I had the same error, the image not existed in the directory with same name.

Sign In or Register to comment.