How to add a dynamic library to Android?
Posted
by Malcolm
on Stack Overflow
See other posts from Stack Overflow
or by Malcolm
Published on 2010-06-12T19:04:49Z
Indexed on
2010/06/12
19:12 UTC
Read the original article
Hit count: 429
I want to add a non-native shared library to Android so every application on the device would be able to use it. I mean using packaged classes just like a core library as if they were present in the application itself.
I studied Android source code to figure out a way to add a new path to the application ClassLoader
and found out that it is created during startup and there's no way to change the paths later. I can use my own ClassLoader
, but all I will get after loading a class will be a reference to a Class
object. This way I will be bound to work through reflection mechanism, which is slower than the native execution system.
Is there any way to organise a shared library on Android?
© Stack Overflow or respective owner