Do i need to copy .so files to System/libs?

好久不见. 提交于 2019-12-24 03:24:37

问题


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.

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?

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

Any Help would be Appreciated.


回答1:


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?

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

But, please double check why

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

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.

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

From data/data/myApp.PackageName/lib



来源:https://stackoverflow.com/questions/51746914/do-i-need-to-copy-so-files-to-system-libs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!