ubuntu编译android源码怎么排错-创新互联
这篇文章主要介绍“ubuntu编译android源码怎么排错”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“ubuntu编译android源码怎么排错”文章能帮助大家解决问题。
创新互联公司是一家专业从事做网站、网站制作、网页设计的品牌网络公司。如今是成都地区具影响力的网站设计公司,作为专业的成都网站建设公司,创新互联公司依托强大的技术实力、以及多年的网站运营经验,为您提供专业的成都网站建设、营销型网站建设及网站设计开发服务!编译源码
1、安装 openjdk8
sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jdk
2 如果电脑里面存在多个java 版本,则通过如下命令选择openjdk-8即可
sudo update-alternative --config java sudo update-alternative --config javac
2、安装依赖库
sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 sudo apt-get install dpkg-dev libsdl1.2-dev libesd0-dev sudo apt-get install git-core gnupg flex bison gperf build-essential sudo apt-get install zip curl zlib1g-dev gcc-multilib g++-multilib sudo apt-get install libc6-dev-i386 sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev sudo apt-get install libgl1-mesa-dev libxml2-utils xsltproc unzip m4 sudo apt-get install lib32z-dev ccache sudo apt-get install libssl-dev
3、开始编译
/bin/bash: m4: command not found
[ 12% 12196/98404] Check module type: out/host/linux-x86/obj/STATIC_LIBRARIES/libsepol_intermediates/link_type
[ 12% 12197/98404] Export includes file: -- out/host/linux-x86/obj/EXECUTABLES/sepolicy-analyze_intermediates/export_includes
[ 12% 12198/98404] Import includes file: out/host/linux-x86/obj/EXECUTABLES/sepolicy-analyze_intermediates/import_includes
[ 12% 12199/98404] build out/target/product/sp7731e_1h10/sp7731e-1h10-native.dtb
[ 12% 12200/98404] Notice file: system/sepolicy/NOTICE -- out/target/product/sp7731e_1h10/obj/NOTICE_FILES/src/recovery/root/sepolicy.txt
[ 12% 12201/98404] target StaticLib: libsprd_updater (out/target/product/sp7731e_1h10/obj/STATIC_LIBRARIES/libsprd_updater_intermediates/libsprd_updater.a)
[ 12% 12202/98404] Copy: out/target/product/sp7731e_1h10/kernel
ninja: build stopped: subcommand failed.
FAILED: [W][2020-11-11T18:19:35+0800][2358] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2020-11-11T18:19:35+0800][2358] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
18:19:47 ninja failed with: exit status 1
遇见这个最后的报错的时候,注意向上看看base输出。
这就是问题所在,比如我的:/bin/bash: m4: command not found
然后 下载这个指令就可以了:sudo apt-get install m4
然后重新make,继续执行就可以了。
(3)FAILED: out/target/product/fugu/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/target/product/fugu/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)
[ 6% 3452/56388] //frameworks/base/libs/androidfw:libandroidfw clang++ ResourceTypes.cpp [linux]
ninja: build stopped: subcommand failed.
09:56:41 ninja failed with: exit status 1
去除所有本地化的设置,让命令能正确执行,bash 执行:
export LC_ALL=C
export LC_ALL=C
to your .bashrc file under your home folder
4)error: ro.build.fingerprint cannot exceed 91 bytes
更改 build/tools/post_process_props.py 文件行 PROP_VALUE_MAX = 91 为 PROP_VALUE_MAX = 128
#### PROP_VALUE_MAX = 91
PROP_VALUE_MAX = 128
更改 bionic/libc/include/sys/system_properties.h 文件行 #define PROP_VALUE_MAX 91 为 #define PROP_VALUE_MAX 128
#### #define PROP_VALUE_MAX 91
#define PROP_VALUE_MAX 128
更改 frameworks/native/cmds/installd/installd_deps.h 文件行 constexpr size_t kPropertyValueMax = 91u; 为 constexpr size_t kPropertyValueMax = 128u;
#### constexpr size_t kPropertyValueMax = 91u;
constexpr size_t kPropertyValueMax = 128u;
关于“ubuntu编译android源码怎么排错”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注创新互联行业资讯频道,小编每天都会为大家更新不同的知识点。
分享标题:ubuntu编译android源码怎么排错-创新互联
网站URL:http://pwwzsj.com/article/dghged.html