如何在Eclipse Project AOSP Android中解决文件映射问题 [英] How to resolve so file mapping in eclipse project aosp android

查看:86
本文介绍了如何在Eclipse Project AOSP Android中解决文件映射问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在aosp 9中工作,我将整个浏览器应用程序从6迁移到了9.

I am working in aosp 9 where I migrated the entire Browser app from 6 to 9.

我有librawrapper.so,可在jni/armv7-a/文件夹中找到.该项目是日食,因此我无法在gradle中进行编辑.因此它只有mk文件.

I have librawrapper.so which is available in jni/armv7-a/ folder. This project is eclipse and hence I am not able to edit in gradle. So it has only mk file.

 LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

SODIR=armv7-a

LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_TAGS := optional

LOCAL_PRELINK_MODULE := false

LOCAL_MODULE    := librawrapper.so
LOCAL_SRC_FILES := $(SODIR)/librawrapper.so
LOCAL_SHARED_LIBRARIES := libcutils

include $(BUILD_PREBUILT)

当我使用mm命令时,我可以在Install中看到它:out/target/product/sabresd_6dq/system/lib/librawrapper.so

When I use mm command, i can see this in Install: out/target/product/sabresd_6dq/system/lib/librawrapper.so

但是当我使用make命令使用整个构建时,构建是成功的,但是当我单击浏览器图标时,它崩溃了,并且当我检查日志系统/lib文件夹为空并引发了以下错误时,

But when I use whole build using make command, build is successful but when I click the browser icon, it crashes and when I checked the log system/lib folder turns empty and it throws error that,

   java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/app/Browser/Browser.apk"],nativeLibraryDirectories=[/system/app/Browser/lib/arm, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]] couldn't find "librawrapper.so"

我可以知道如何解决此错误吗?是否可以在mk文件中添加或修改以启用ndk或正确地映射到system/lib文件夹中?

May I know how to resolve this error? Is it possible to add or modify in mk file to enable the ndk or properly making to map in system/lib folder?

推荐答案

找到的解决方案:

转到build/target/product/core_minimal.mk

Go to build/target/product/core_minimal.mk

添加此行:

 PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.software.webview.xml:system/etc/permissions/android.software.webview.xml \
        frameworks/native/cmds/librawrapper.so:system/lib/librawrapper.so

还需要在frameworks/native/cmds/

Also you need to add the librawrapper.so in frameworks/native/cmds/

然后编译它.它将把它推送到system/lib/

Then compile it. It will push that into system/lib/

这篇关于如何在Eclipse Project AOSP Android中解决文件映射问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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