1

I have resource files in res/drawable-xhdpi folder of my Android project.

Android Studio doesnt have any problem building the application and it runs fine.

I am moving the project to Android.mk and i get the following at build time "warning: no entries written for drawable/resource_name". When I try to run the built apk, I get a Resource not found error.

Can any one please guide me as to what I am missing?

Thanks.

Anil Maddala
  • 898
  • 16
  • 34

2 Answers2

1

Instead of doing mm, do a full build of the app perhaps? (using make)

Also, there was this error I faced once, though I am not completely sure if it is applicable here. You should have one copy in res/drawable irrespective of whichever overlay you're putting it in. It is because the compiler first checks drawable and then overrides it with the device specific overlay. If it doesn't find it there, it will throw an error.

Anindya Dutta
  • 1,972
  • 2
  • 18
  • 33
0

In some cases, cleaning the project helps. Check with that first.

Anindya Dutta
  • 1,972
  • 2
  • 18
  • 33
  • I am doing a clean build every time using Android.mk. The command is mm -B – Anil Maddala May 20 '15 at 18:47
  • Instead of doing `mm`, do a full build of the app perhaps? (using `make`) – Anindya Dutta May 20 '15 at 18:51
  • Also, there was this error I faced once, though I am not completely sure if it is applicable here. You should have one copy in `res/drawable` irrespective of whichever overlay you're putting it in. It is because the compiler first checks `drawable` and then overrides it with the device specific overlay. If it doesn't find it there, it will throw an error. If this helps, I will add this as an answer. – Anindya Dutta May 20 '15 at 19:05
  • @AnindyaDutta, your solution is correct. AOSP (Android.mk) and Gradle builds are two different beasts. Please add your comment as an answer. – Robert Aug 31 '15 at 13:29