Arturs Vancans
Arturs Vancans

Reputation: 4640

Accessing images from JAR library in Android

I have compiled a JAR library for Android which contains some code and resources. (see below) I would like to access the images in the library from my code.

What should I do to make the library resources accessible using eg. R.drawable.album_artwork?

enter image description here

Upvotes: 2

Views: 266

Answers (1)

flx
flx

Reputation: 14226

This is not possible. You need to include the library as library project. With the new build system gradle / android studio, you can move to .aar files which basically includes the library project in binary form.

For more information on how to create a library project, check out the official documentation: https://developer.android.com/tools/projects/projects-eclipse.html

Upvotes: 3

Related Questions