I'm trying to add picture to a map overlay, but the application dies
("The appliation HelloMap has stopped unexpectedly."). Judging by
logcat, I believe the problem has to do with how I access the drawable

E/AndroidRuntime(  843): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.example.hellomapview/
com.example.hellomapview.HelloMapActivity}:
android.content.res.Resources$NotFoundException: File res/drawable/
red.png from xml type layout resource ID #0x7f020000

I'm confused because I thought adding icons to an application was as
easy as including them in res/drawable and then accessing them using
the R object. In my case:

$> ls res/drawable/
red.png

and reference it from my code:

getResources().getDrawable(R.drawable.red);

Am I missing something here?

jerome

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to