问题描述
我尝试根据此,如下所示:
I tried to include a prebuilt google apk (with no .so file) to my marshmallow AOSP build based on the information found in this link as follows:
-
在我的供应商/制造商/设备/专有/系统/应用程序中,我创建了一个名为"Testapk"的文件夹.
In my vendor/manufacturer/device/proprietary/system/app, I created a folder named 'Testapk'.
我在此"Testapk"文件夹中保存了两个文件,即apk("Testapk.apk")和一个包含以下说明的Android.mk文件:
I saved two files in this 'Testapk' folder, the apk ('Testapk.apk') and an Android.mk file which contains the following instructions:
包括$(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS:=可选
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= Testapk
LOCAL_MODULE := Testapk
LOCAL_SRC_FILES:= $(LOCAL_MODULE).apk
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS:=应用程序
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX:= $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE:=预先签名
LOCAL_CERTIFICATE := PRESIGNED
包括$(BUILD_PREBUILT)
include $(BUILD_PREBUILT)
- 我在我的vendor/manufacturer/device/vendor_device.mk中添加了以下说明:
Testapk
进行AOSP构建时,出现以下错误:
When making the AOSP build, I get the following error:
make: *** No rule to make target `/Testapk', needed by `out/target/product/mako/obj/APPS/Books_intermediates/Testapk.apk'. Stop.
#### make failed to build some targets (01:00 (mm:ss)) ####
推荐答案
我的Android.mk
文件的问题是每行上都有尾随空格.删除这些尾随空格后,一切正常.
The problem with my Android.mk
file was that it had trailing spaces on each line. Everything worked fine after I deleted these trailing spaces.
这篇关于将预构建的APK添加到AOSP构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!