I have followed the TabHost sample to start building my application.
When I run it in the emulator, it crashes with an exception :
E/AndroidRuntime(375): java.lang.RuntimeException: Unable to start activity 
ComponentInfo{com.letrajet.android.maps2/com.letrajet.android.maps2.HomeActivity}:
 
android.content.res.Resources$NotFoundException: File 
res/drawable/ic_tab_gmap.xml from drawable resource ID #0x7f020008

I followed the instructions, creating my state-list drawable in the 
drawable directory (which I had to create) and putting a copy of my two 
state icons in each of the drawable-xxx directories.

Here is the content of the xml file :
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"; >
    <item android:drawable="@+drawable/ic_gmap_dark.png"
        android:state_selected="true" />

    <item android:drawable="@+drawable/ic_gmap_light.png" />
    
</selector>

First thing worth noting : I could not simply declare the resource as 
described in the tutorial - @drawable/ic_gmap_dark.png
An error was generated saying :
error: Error: No resource found that matches the given name (at 'drawable' 
with value '@drawable/ic_gmap_dark.png')
However, if I put a '+' in there, it generated an id in R.java for me.

Am I supposed to declare in another file the existence of my ic_tab_gmap.xml 
file ?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/android-discuss/-/x_G4QI-1uXcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to