一.预置uc浏览器报错
FAILED: out/target/product/apower_xj/obj/APPS/UcApp_intermediates/oat/arm64/package.odex
/bin/bash -c "(rm -f out/target/product/apower_xj/obj/APPS/UcApp_intermediates/oat/arm64/package.odex ) && (mkdir -p out/target/product/apower_xj/obj/APPS/UcApp_intermediates/oat/arm64/ ) && (ANDROID_LOG_TAGS=\"*:e\" out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --class-loader-context=\"&\" --boot-image=out/target/product/apower_xj/dex_bootjars/system/framework/boot.art --dex-file=vendor/mediatek/proprietary/packages/3rd-party/UcApp/UcApp.apk --dex-location=/system/app/UcApp/UcApp.apk --oat-file=out/target/product/apower_xj/obj/APPS/UcApp_intermediates/oat/arm64/package.odex --android-root=out/target/product/apower_xj/system --instruction-set=arm64 --instruction-set-variant=cortex-a53 --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=quicken )"
dex2oatd ] Verification error in android.view.View com.ali.user.open.core.webview.WVUcWebViewProxy.getWebView()
dex2oatd ] android.view.View com.ali.user.open.core.webview.WVUcWebViewProxy.getWebView() failed to verify: android.view.View com.ali.user.open.core.webview.WVUcWebViewProxy.getWebView(): [0x2] returning 'Reference: com.ali.user.open.core.webview.MemberUCWebView', but expected from declaration 'Reference: android.view.View'
dex2oatd ]
dex2oatd ] Had a hard failure verifying all classes, and was asked to abort in such situations. Please check the log.
//编译出来的APP在源码中编译odex失败问题
参考:https://blog.csdn.net/kris_fei/article/details/88660382
//解决应用开机加速,生成odex文件报错问题
在该应用的mk文件中添加 LOCAL_DEX_PREOPT := false
二.预制某应用时,“libce2and.so” not found
//解决 Error preloading public library libce2and.so: dlopen failed: library “libce2and.so” not found
编译apk后so文件在dlopen时出现linker权限问题
参考:https://blog.csdn.net/yang542397/article/details/88103951
解决办法:将apk中的.so文件拷贝到于mk同级目录下新建lib/arm,在mk中将.so文件拷贝到out/system/app/应用名/lib下
例:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Module name should match apk name to be installed
LOCAL_MODULE := XXXX
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := PRESIGNED
#LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app
LOCAL_MULTILIB :=32
include $(BUILD_PREBUILT)
LOCAL_MODULE_PATH := $(TARGET_OUT)/app
$(warning "start copy lib form $(LOCAL_PATH)/lib to $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)/")
$(shell mkdir -p $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)/lib/)
$(shell cp -f -r $(LOCAL_PATH)/lib $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)/)
$(warning "end copy")