android应用程序作为系统应用程序安装时找不到jni库
最近我遇到这样的问题,当我在android应用程序中使用jni时,当构建apk时,test.so被放入apk包中的lib/armeabi/中,当我将此apk安装为用户应用程序时,它可以运行并找到使用 System.LoadLibrary() 查找库时。当我将其安装在 system/app 中时,它找不到该库。任何人以前遇到过这样的问题,你能告诉我如何解决这个问题,非常感谢你的建议。
recently I meet such problem, when I use jni with android application , when the apk is built , the test.so is put in lib/armeabi/ in the apk package , when I install this apk as user application , it can run and find the library when use System.LoadLibrary() to find it . while when I install it in system/app , it can't find the library . anyone meet such kind of problem before and could you tell me how to solve this , thanks very much for any suggestions .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Android NDK 组上的这个答案似乎有您的答案:
http://groups.google.com/group/android-ndk/browse_thread/thread/bfceac612dceae8c/7f2b8b48a87c2a52?show_docid=7f2b8b48a87c2a52
简而言之,您似乎无法执行此操作,因为
/system
被安装为只读
,这意味着您的 APK+库已在工厂安装。This answer on the Android NDK group seems to have your answer:
http://groups.google.com/group/android-ndk/browse_thread/thread/bfceac612dceae8c/7f2b8b48a87c2a52?show_docid=7f2b8b48a87c2a52
In a nutshell it looks like you cannot do it because
/system
is mountedread-only
which means that you the APK+library are installed in the factory.