0

I am using some resources (images/drawable) in my own framework Android project to render some UI widgets. I just want to supply my framework as .jar to my clients. My clients can use this jar in their Android application libs.

The problem is even though I am exporting /res (i.e all images) directory at the time of .jar conversion, my client application is unable to use them. The reason I know is my client android application always look resources (images refereed as R.drawble.imgId) in client application resources but not in jar.

After goggling, I found a way to solve this is to supply my framework resources as zip along with .jar, so that my client applications will place supplied resources in their /res/drawable folder and no issues.

Now my Question is Is there any other way to achieve? How android is doing this for its view backgrounds?

Ganesh K
  • 2,623
  • 9
  • 51
  • 78
  • check this for various approaches http://stackoverflow.com/questions/17063826/how-to-create-jar-for-android-library-project – Kirtan Nov 05 '14 at 12:32

1 Answers1

0

For Distributed Jar, I found below method as simpler compare to others.

Please see below link for more

Packaging Android resource files within a distributable Jar file

Community
  • 1
  • 1
Ganesh K
  • 2,623
  • 9
  • 51
  • 78