A. Liu A. Liu - 1 year ago 155
Android Question

Android drawable: Unknown resource type @drawable-nodpi

I created a new Android Resource Directory

inside of res and placed my a png image inside, but when I try to reference it with the code below, it returns an error of

unknown resource type @drawable-nodpi

What am I doing wrong? I works fine when I place it into
but the image was
too large to be uploaded into a texture
. I am using Android Studio 2.1.2


Answer Source

You don't use @drawable-nodpi/java. It should be @drawable/java. Android will automatic select the source with device's configuration.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download