Android5.1编译问题锦集
什么,你管这叫锦集?
============================================
Checking build tools versions...
************************************************************
You asked for an OpenJDK 7 build but your version is
java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode).
************************************************************
build/core/main.mk:191: *** stop. Stop.
jdk 1.7?
如果没有注册甲骨文的账号,同学们可以通过网盘下载。
我传到网盘上了。
链接:https://pan.baidu.com/s/1PAAfUdkbwRlzbt72upHHlw 提取码:jj5b
unsupported reloc 43 against global symbol stderr
/home/aosp/android5.1/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/STATIC_LIBRARIES/libcompiler_rt_intermediates/libcompiler_rt.a(eprintf.o): unsupported reloc 43 against global symbol stderr
external/compiler-rt/lib/builtins/eprintf.c:32: error: unsupported reloc 43
collect2: ld returned 1 exit status
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libcompiler_rt.so' failed
make: *** [out/host/linux-x86/obj32/lib/libcompiler_rt.so] Error 1
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
修改 build/core/clang/HOST_x86_common.mk
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS :=
--gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)
--sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot
-B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \
国外小哥的答案,哈哈!
You have tried to change the API from what has been previously approved
out/target/common/obj/PACKAGING/public_api.txt:20: error 5: Added public field android.Manifest.permission.BACKUP
out/target/common/obj/PACKAGING/public_api.txt:82: error 5: Added public field android.Manifest.permission.INVOKE_CARRIER_SETUP
out/target/common/obj/PACKAGING/public_api.txt:106: error 5: Added public field android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
out/target/common/obj/PACKAGING/public_api.txt:116: error 5: Added public field android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST
******************************
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
errors above.
2) You can update current.txt by executing the following command:
make update-api
To submit the revised current.txt to the main Android repository,
you will need approval.
******************************
development/apps/Development/res/drawable-mdpi/stat_sample.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
build/core/tasks/apicheck.mk:62: recipe for target 'out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp' failed
make: *** [out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp] Error 38
make: *** Waiting for unfinished jobs....
target SharedLib: libRS (out/target/product/generic_x86_64/obj/SHARED_LIBRARIES/libRS_intermediates/LINKED/libRS.so)
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: packages/apps/Music/src/com/android/music/SharedPreferencesCompat.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
解决方式已经给出提示了。
'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp' failed
去本地化设置
export LC_ALL=C
参考文章
使用虚拟机VM,Ubuntu 18.04.2 LTS编译android系统7.1遇到的问题