Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/319.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java android p构建失败-apache-xml_中间产品-hiddenapi_Java_Android_Android Source_Android 9.0 Pie - Fatal编程技术网

Java android p构建失败-apache-xml_中间产品-hiddenapi

Java android p构建失败-apache-xml_中间产品-hiddenapi,java,android,android-source,android-9.0-pie,Java,Android,Android Source,Android 9.0 Pie,Ubuntu 18.04 安卓p repo init-u-b安卓-9.0.0u r60 知道这是怎么回事吗?我猜这是Java环境中的一个不同之处,因为hiddenapi二进制文件似乎失败了,但构建似乎正在接受源代码树中捆绑的Java,所以它应该可以工作。在此构建之前,我删除了所有java包。我需要安装一些吗?我在某个时候成功地做到了这一点,但在一台干净的机器上却无法恢复。提前谢谢 Parsing out/target/product/arm64/obj/ETC/sepolicy_neverall

Ubuntu 18.04

安卓p

repo init-u-b安卓-9.0.0u 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
Parsing out/target/product/arm64/obj/ETC/sepolicy\u neverallows\u intermediates/plat\u pub\u policy.cil
解析out/target/product/arm64/obj/ETC/vendor\u sepolicy.cil\u intermediates/vendor\u policy\u raw.cil
[83%63419/76082]目标缓存fs映像:out/Target/product/arm64/cache.img
警告:out/target/product/arm64/cache.img接近大小限制(现在为69206016;限制为69206016)
[85%64672/75715]build out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex hiddenapi/classes.dex
失败: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/)&(mkdir-p-out/target/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex/-maxdepth-1-name \“classes*.dex\”排序{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-blacklist.txt--blacklist=out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt)”
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]未指定索引文件
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]命令: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--黑名单=out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]用法:hiddenapi[选项]。。。
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=:指定要设置其成员访问标志的dex文件。
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]必须至少指定一个--dex参数。
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]--浅灰色列表=:
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]--深灰色列表=:
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]--黑名单=:带有要标记的方法/字段签名的文本文件
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]分别为灰色列表/黑名单。必须至少提供一个列表。
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]--打印隐藏api:将标记的方法/字段列表转储到标准输出。
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]没有迹象表明它们属于哪种API类别。
hiddenapi E 11-08 12:34:51 29841 29841 hiddenapi.cc:47]
[85%64679/75707]//libcore:core-oj-d8[通用]
忍者:构建停止:子命令失败。
12:35:01忍者失败:退出状态1
####未能构建某些目标(02:49:08(hh:mm:ss))####
sburke@sburke-xps:~/sandbox/a/pie$java--版本
OpenJDK9
OpenJDK运行时环境(构建9+181-android4627429)
OpenJDK 64位服务器虚拟机(构建9+181-android4627429,混合模式)
sburke@sburke-xps:~/sandbox/a/pie$哪个java
/home/sburke/sandbox/a/pie/prebuilts/jdk/jdk9/linux-x86/bin/java

我在XDA论坛上找到信息,在重新启动构建后,此问题可以得到解决:

这对我没有帮助,但我能够通过一步一步地解决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上构建天堂OS 16(基于Android 9)时也遇到了同样的问题

我可以确认这在这种情况下也有效。而且我每天都使用我的构建,我没有发现任何问题