1

Hi,

I am patching the android platform. I have succaessfully included a prebuilt JAR in the build of the platform, and the classes load and work as expected.

My issue is that the JAR itself includes resource files and the clasess use them. This fails during runtime (ClassLoader.getResource() and ClassLoader.getResourceAsStream()). I've searched the web and found that Android allows resources only in package builds (.apk) and doesn't allow for JARs.

My question is: How can I bunlde the resources alongside the JAR? Can I create an APK build and use code inside of it like a JAR? I have all the source and resource files at hand. Currently I signify other platform projects to depend on my JAR with:

LOCAL_STATIC_JAVA_LIBRARIES := my-prebuilt-module-name

and this works. All left is bundling the resources too...

Thanks a lot

1 Answer 1

2

I think you are looking for a library project. This allows you to import code and resources into multiple Android apps.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.