Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error message "Resource is not public"

Tags:

So I'm trying to use the built-in drawable timepicker_up_btn for api level 7. It is in the actual res folder in the sdk, and I can use other resources from that folder. But I get the error message "Resource is not public".

It seems like Google is trying to limit the use of this resource. I would think they don't care if I use it in an Android application and it makes the overall look of my application similar to stock Android.

Anyway, is this fixable? Can I somehow use a non-public resource without copying it to my project? And what is the deal with copying stock resources to own projects? Illegal? Frowned upon? Or go ahead we don't care?

like image 467
Espen Avatar asked Nov 05 '11 08:11

Espen


1 Answers

The best thing to do is to copy the files to our application. I was told by some Google employees that you should not reference the resources, rather copy them to your application.

One of the reasons for this is that if you reference a whole bunch of icons for your application, you are not guaranteed that every one of these is updated at the same time when new versions of the SDK is released. You might end up with some up-to-date fancy icons and some old ones :)

like image 52
Eric Nordvik Avatar answered Sep 28 '22 06:09

Eric Nordvik