Issue
I created a new Android Resource Directory drawable-nodpi
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 @drawable
but the image was too large to be uploaded into a texture
. I am using Android Studio 2.1.2
android:src="@drawable-nodpi/java"
Solution
You don't use @drawable-nodpi/java
. It should be @drawable/java
. Android will automatic select the source with device's configuration.
Answered By - mdtuyen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.