簡體   English   中英

android p 構建失敗 - apache-xml_intermediates - hiddenapi

[英]android p build failing - apache-xml_intermediates - hiddenapi

Ubuntu 18.04

安卓P

回購初始化 -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r60

知道這里發生了什么嗎? 我猜這是 Java 環境中的一個差異,因為 hiddenapi 二進制文件似乎失敗了,但構建似乎正在獲取源樹中捆綁的 java,所以它應該可以工作。 我在此構建之前刪除了所有 java 包。 我需要安裝一些嗎? 我能夠在某個時候獲得成功,但無法在干凈的機器上恢復。 提前致謝。

Parsing out/target/product/arm64/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil
Parsing out/target/product/arm64/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy_raw.cil
[ 83% 63419/76082] Target cache fs image: out/target/product/arm64/cache.img
WARNING: out/target/product/arm64/cache.img approaching size limit (69206016 now; limit 69206016)
[ 85% 64672/75715] build out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/classes.dex
FAILED: out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/classes.dex 
/bin/bash -c "(rm -rf out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/ ) && (mkdir -p out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/ ) && (find out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex/ -maxdepth 1 -name \"classes*.dex\" | sort | xargs -I{} cp -f {} out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/ ) && (find out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/ -name \"classes*.dex\" | sort | sed 's/^/--dex=/' | xargs out/host/linux-x86/bin/hiddenapi --light-greylist=out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt )"
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] No DEX files specified
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] Command: out/host/linux-x86/bin/hiddenapi --light-greylist=out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] Usage: hiddenapi [options]...
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] 
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]   --dex=<filename>: specify dex file whose members' access flags are to be set.
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]       At least one --dex parameter must be specified.
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] 
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]   --light-greylist=<filename>:
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]   --dark-greylist=<filename>:
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]   --blacklist=<filename>: text files with signatures of methods/fields to be marked
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]       greylisted/blacklisted respectively. At least one list must be provided.
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] 
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]   --print-hidden-api: dump a list of marked methods/fields to the standard output.
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]       There is no indication which API category they belong to.
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47] 
[ 85% 64679/75707] //libcore:core-oj d8 [common]
ninja: build stopped: subcommand failed.
12:35:01 ninja failed with: exit status 1

#### failed to build some targets (02:49:08 (hh:mm:ss)) ####

sburke@sburke-xps:~/sandbox/a/pie$ java --version 
openjdk 9
OpenJDK Runtime Environment (build 9+181-android4627429)
OpenJDK 64-Bit Server VM (build 9+181-android4627429, mixed mode)
sburke@sburke-xps:~/sandbox/a/pie$ which java 
/home/sburke/sandbox/a/pie/prebuilts/jdk/jdk9/linux-x86/bin/java

我在 XDA 論壇上找到的信息說這個問題可以在重新啟動構建后修復: https : //forum.xda-developers.com/t/xperia-open-project-and-gapps-help-wanted.3870751/ #post-78284912

它沒有幫助我,但我能夠通過逐步解決 Ubuntu 20.04 LTS 上的問題,即清理失敗的模塊,然后僅構建此特定模塊:

$ make clean-apache-xml
$ make apache-xml

在那之后,我在另一個模塊 - ims-common 上遇到了同樣的問題。 我對這個包做了同樣的事情,在成功構建 apache-xml 之后,我能夠完成 AOSP 構建:

$ make clean-ims-common
$ make ims-common
$ make apache-xml
$ make -j12

我在 Ubuntu 20.04 LTS 上構建 LineageOS 16(基於 Android 9)時遇到了同樣的問題。

我可以確認安東的解決方案在這種情況下也有效。 此外,我每天都使用我的構建,我沒有發現任何問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM