• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Google's demo project - errors

fidekk

Lurker
I just started making my way through beginner tutorials on developer.android.com. I'm stuck at the chapter which explains the life cycle of activities. I understand it but I can't get the supplied sample (sample) to work.

I start a new project with "Android project from existing code" and select the downloaded files but Graphical Layout view reports some errors like:

Code:
Failed to convert @color/dark_yellow into a drawable
Color value '@color/light_yellow' must start with #
Couldn't resolve resource @color/dark_yellow
Couldn't resolve resource @dimen/font_medium

I'm sure there's a simple solution...

I'm attaching an image: Image
 
1) looks like the resource dark_yellow doesn't exist or isn't correctly intialized.
2) font_medium doesn't exist apparently.
3) light_yellow's value isn't allowed. It needs to be in the form #aarrggbb or #rrggbb
 
Colors are defined in values/colors.xml:

Code:
<resources>
    <color name="white">#FFFFFF</color>
    <color name="black">#000000</color>

    <color name="light_blue">#A8DFF4</color>
    <color name="light_green">#D3E992</color>
    <color name="light_red">#FFAFAF</color>
    <color name="light_yellow">#FFECC0</color>

    <color name="dark_blue">#0099CC</color>
    <color name="dark_green">#669900</color>
    <color name="dark_red">#CC0000</color>
    <color name="dark_yellow">#FF8A00</color>
</resources>

And font_medium is defined in values/dimensions.xml:

Code:
<resources>
    <dimen name="font_large">44dp</dimen>
    <dimen name="font_medium">24dp</dimen>
    <dimen name="font_small">10dp</dimen>
</resources>

That's why I'm confused...:confused:
 
Thanks for your help but the problem solved itself. I found out that it's working today and no errors are reported, although I did restart Eclipse yesterday and it didn't help.
 
Eclipse is a somewhat buggy platform, and often times does some very weird things. All I can say is get used to it. lol
 
Back
Top Bottom