Forum Xamarin.Android

Errors in my styles xml file showing up --

Hello All.

I got a something error[well 3 actually] while working on my practice android app. It is related to the styles.xml definition file. It's confusing me because so long my styles file worked just okay, and these errors just showed up recently, suddenly. Just like that, midway.
It says:

No resource found that matches the given name 'Widget'

Now, it points to this particular line:
<style name="Theme.Splash" parent="android:Theme"> <item name="android:windowBackground">@drawable/splash</item> </style>

The line with <item name ..... ..... that one line only. Why and what causes this and that too now, is strange 'cuz the splash image is there okay in the folder.
So what does this mean basically? I mean why it appeared like this when it was not there before? Can you please tell me? What do I need to do here?

Can anybody tell me how to tackle this? If you need more info on what else I did where, which could have possibly caused this effect, please let me know, I'll provide it to you.


  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭

    Can you post your project so I can take a look at it?

  • PGChoudhuryPGChoudhury INMember

    Hi Lori, thanks so much you replied.
    Sure, if that helps I'll do it. Just let me clear 'obj' so that total size decreases and then it does upload hopefully.

    But meanwhile, from the information I gave [I agree, it's not so much just a small sneak-peek] can you think of anything that could be causing this anomaly? I mean like any possible suspicions, or a possible hint, @LoriLalonde?


  • PGChoudhuryPGChoudhury INMember

    Okay, @LoriLalonde and all others who would like to see in this and help me correct the errors, here it is:

    Hopefully you will be able to reproduce it now and see that error I spoke of earlier,

  • PGChoudhuryPGChoudhury INMember

    Hi, Lori,

    Did you run my sample and recreate the errors that I spoke of earlier? Hope you saw them!
    What is here that I am doing wrongly? Why is it prompting about problems in my styles xml file and what's it got to do with widget here?

    Did anybody else take a look at it either? Please teach me here what gone wrong and how to put it back on the track working again,


  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭

    Hi @PGChoudhury, the issue in your styles.xml is related to the three styles you are trying to derive from the parent style Widget. The error has nothing to do with the Theme.Splash style.

    Change the parent property of the bottom 3 styles from parent="Widget" to parent="android:Widget"

    You also have an error in your one form that tries to set android:marginLeft and android:marginRight. Change those to android:layout_marginLeft and android:layout_marginRight.

  • PGChoudhuryPGChoudhury INMember

    Hi Lori, thanks for replying.
    Let me take a look at these 4 points one by one by myself. Hopefully I'll be able to align it rightly and get this working again.
    Thanks so much taking a look into my sample, and evaluating it along the way.
    I am very thankful to you, @LoriLalonde

    Meanwhile, all other forum members, our helpful Xamarin people, I encourage all of you to take this sample, run, see, evaluate, inspect, scrutinize [when you have spare-time of course] and come up with more and more points for me to improve upon. More and more aspects where a certain thing can be made a little better [whatever little I have done so far]. Because my Xamarin Android venture is just 45 days old[total noob]. And I am highly eager to read, hear and soak in as much as possible literally. All of it. So keep them all coming, I'd be indebted for that. This is totally a learning/seeing//studying period going on for me now.


  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭

    @PGChoudhury, Xamarin University also provides a free 30 day trial so I recommend trying that out if you're anxious to learn quickly:

  • PGChoudhuryPGChoudhury INMember

    Hi, once again,
    @LoriLalonde thanks for that piece of advice, I have signed up for that.
    Also yes, I rectified the code in the places you pointed out also some other parts it builds okay, no errors/warnings now at least.

    Thanks so much!

Sign In or Register to comment.