类文件的未知软件包名称 [英] Unknown package name of class file
问题描述
I have two libraries that I want to add to AOSP: Azure Storage & Jackson Core
当Azure存储依赖于Jackson时。
When Azure Storage depends on Jackson.
跟随此说明,我已将它们都添加到 [MAIN_FOLDER] / external
以及以下 Android.mk
文件:
Following this instructions, I've added both of them under [MAIN_FOLDER]/external
and with the following Android.mk
files:
对于杰克逊-
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := jackson
LOCAL_MODULE_TAGS := eng debug optional
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, src/main)
include $(BUILD_JAVA_LIBRARY)
并用于Azure存储-
and for Azure storage -
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := azure-storage
LOCAL_JAVA_LIBRARIES := jackson
LOCAL_MODULE_TAGS := eng debug optional
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, src/main)
include $(BUILD_JAVA_LIBRARY)
当我还添加了
PRODUCT_BOOT_JARS := \
jackson \
azure-storage
到我的 core_minimal.mk
。
以及以下内容到 [MAIN_FOLDER] /frameworks/base/services/core/Android.mk
:
LOCAL_JAVA_LIBRARIES += jackson azure-storage
A,当我尝试进行update-api&& make
,
我得到以下错误:
Alas, when I try to make update-api && make
,
I get the following error:
错误:out / target / common / obj /JAVA_LIBRARIES/jackson_intermediates/classes.jar:类文件com / fasterxml / jackson / core / JsonLocation.class
Error: out/target/common/obj/JAVA_LIBRARIES/jackson_intermediates/classes.jar: unknown package name of class file com/fasterxml/jackson/core/JsonLocation.class
错误:out / target / common / obj /JAVA_LIBRARIES/azure-storage_intermediates/classes.jar:类文件com / microsoft / azure / storage / CorsRule.class的未知软件包名称
Error: out/target/common/obj/JAVA_LIBRARIES/azure-storage_intermediates/classes.jar: unknown package name of class file com/microsoft/azure/storage/CorsRule.class
make:*** [out / target / common / obj / PACKAGING / boot-jars-package-check_intermediates / stamp]错误1
make: *** [out/target/common/obj/PACKAGING/boot-jars-package-check_intermediates/stamp] Error 1
make:***等待未完成的工作....
make: *** Waiting for unfinished jobs....
谢谢!
推荐答案
第一个,我们最好找到此错误的出处,通过'grep'我们发现它来自Python: build / core / tasks / check_boot_jars / check_boot_jars.py :
First, we'd better find where this error comes from, with 'grep' we found it comes from a Python: build/core/tasks/check_boot_jars/check_boot_jars.py:
def CheckJar(jar):
package_name = os.path.dirname(f)
package_name = package_name.replace('/', '.')
# Skip class without a package name
if package_name and not whitelist_re.match(package_name):
print >> sys.stderr, ('Error: %s: unknown package name of class file %s' % (jar, f))
return False
显然,如果 whitelist_re中不存在您的软件包名称,则会出现错误!
Apparently, if your package name not exists in "whitelist_re", you got the error!
whitelist_re值来自名为 build / core / tasks / check_boot_jars / package_whitelist.txt 的txt文件,因此解决方案是将软件包添加到此白名单文件中。
"whitelist_re"'s values come from a txt file named "build/core/tasks/check_boot_jars/package_whitelist.txt", so the solution is add your package to this whitelist file.
示例列在package_whitelist.txt中。
Examples are listed in package_whitelist.txt.
这篇关于类文件的未知软件包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!