我是否需要将.so文件复制到系统/库中? [英] Do i need to copy .so files to System/libs?

查看:377
本文介绍了我是否需要将.so文件复制到系统/库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使我的应用程序成为系统应用程序.但是,当我将其作为系统应用程序放置时(将.apk文件放入系统/应用程序中),我的应用程序崩溃了. 由于无法加载.so文件而导致崩溃.

I want to make my application as a system application. But my application crashes when i make it as system app (placed .apk file inside System/app). It crashes because its not able to load .so files.

我在这里的第一个问题是我是否需要在System/libs中复制libs(Extract .apk,我将得到libs)还是系统自动执行?

My first question here is do i need to copy the libs( Extract .apk and i will be getting libs) inside System/libs or the System automatically does it?

我的第二个问题是系统是否从System/libs或data/data/myApp.PackageName/lib文件夹中加载库(.so文件)?

My Second question here is does the system load libraries(.so files) from System/libs or data/data/myApp.PackageName/lib folder?

任何帮助将不胜感激.

推荐答案

我在这里的第一个问题是我是否需要在System/libs中复制libs(Extract .apk,我将得到libs)还是系统自动执行?

My first question here is do i need to copy the libs( Extract .apk and i will be getting libs) inside System/libs or the System automatically does it?

您不需要手动复制.so文件.

You don't need to manually copy the .so files.

但是,请仔细检查原因

由于无法加载.so文件而崩溃.

It crashes because its not able to load .so files.

您需要确保目标电话具有相应的 ABI ,例如您需要在实际设备上使用arm64-v8a,但是此ABI 不适用于仿真器,因为通常仿真器是x86x86_64.

you need to ensure that you have the corresponding ABI for your target phone, e.g. you need to have arm64-v8a for your real devices, but this ABI won't work for emulators as usually emulators are x86 or x86_64.

我的第二个问题是系统是否从System/libs或data/data/myApp.PackageName/lib文件夹中加载库(.so文件)?

My Second question here is does the system load libraries(.so files) from System/libs or data/data/myApp.PackageName/lib folder?

来自data/data/myApp.PackageName/lib

From data/data/myApp.PackageName/lib

这篇关于我是否需要将.so文件复制到系统/库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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