My question is that have created one android ndk project which is having its respective .so file.I want to know that can we use same .so file in another android ndk application without copying as it is from one project to another? If yes how can we implement that?
Asked
Active
Viewed 180 times
2
-
1Identical to http://stackoverflow.com/questions/12195426/re-use-code-android-ndk/12203975#12203975 – Seva Alekseyev Oct 04 '12 at 14:15
2 Answers
0
Yes you can if you have defined the same "native" call in the same classes in the same packages.

Philippe Girolami
- 1,876
- 1
- 13
- 15
0
Native libraries are installed in lib directory for an application, which is readable for anyone. Therefore, appB can use
System.Load("/data/data/com.appA/lib/libnativeA.so")
But the guess of the full path to other package's libraries is not based on documented interfaces, and there is no guarantee this will work in future versions.

Alex Cohn
- 56,089
- 9
- 113
- 307