当作为系统应用程序安装的Andr​​oid applicatin无法找到JNI库 [英] android applicatin can't find jni library when installed as system application

查看:106
本文介绍了当作为系统应用程序安装的Andr​​oid applicatin无法找到JNI库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我遇到这样的问题,当我使用JNI的Andr​​oid应用程序,当APK而建,test.so放在LIB / armeabi /在APK包,当我安装此apk为用户应用程序,它可以运行并找到库时使用的System.loadLibrary()来找到它。而当我在系统/应用安装它,它无法找到该库。任何人都遇到这样那样的问题前,你能告诉我怎么解决这个问题,非常感谢您的任何建议。

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 .

推荐答案

在Android NDK组这个答案似乎有了答案:

This answer on the Android NDK group seems to have your answer:

<一个href=\"http://groups.google.com/group/android-ndk/browse_thread/thread/bfceac612dceae8c/7f2b8b48a87c2a52?show_docid=7f2b8b48a87c2a52\">http://groups.google.com/group/android-ndk/browse_thread/thread/bfceac612dceae8c/7f2b8b48a87c2a52?show_docid=7f2b8b48a87c2a52

在简单地说,它看起来像你不能这样做,因为 /系统安装只读这意味着,您的APK +库安装在工厂。

In a nutshell it looks like you cannot do it because /system is mounted read-only which means that you the APK+library are installed in the factory.

这篇关于当作为系统应用程序安装的Andr​​oid applicatin无法找到JNI库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆