版本比较

密钥

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。
目录
minLevel1
maxLevel4
outlinefalse
stylenone
typelist
printablefalse

...

在Ubuntu20.04遇到了,You asked for an OpenJDK based build but your version is java version "1.8.0_77" Java(TM) SE Run

解决方法:原因是编译Android的源码时要安装 openjdk而不是jdk,安装openjdk即可。

  • 问题2

代码块
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"

解决方法:这个错误是由于本地LC_

...

ALL变量导致的,可以在编译前将这个值设置为C即可,即:export LC_ALL=C

  • 问题3

编译报错:SSL error when connecting to the Jack server......recipe for target 'ninja_wrapper' failed

解决方法:

1、cd /etc/java-8-openjdk/security/到该目录下;
sudo vim java.security(注意需要用root用户去打开并修改);
remove "TLSv1, TLSv1.1"这两个配置;

2、重启server

代码块
./prebuilts/sdk/tools/jack-admin kill-server

...


./prebuilts/sdk/tools/jack-admin start-server
  • 问题4

编译报错Error: Could not find or load main class com.tonicsystems.jarjar.Main

解决方法:

代码块
rm -rf out

...


export LANG=C

...


export LC_ALL=C

...


export LC_COLLATE=C

然后按上面的步骤4重新编译

  • 问题5

编译anbox_arm64-userdebug版本报错,
external/libavc/decoder/arm/ih264d_function_selector.c:67: error: undefined reference to 'ih264d_init_function_ptr_av8'

解决方案:

修改文件,./external/libavc/Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
ARCH_ARM_HAVE_NEON:=true       //增加这一行
# encoder
include $(LOCAL_PATH)/encoder.mk
# decoder
include $(LOCAL_PATH)/decoder.mk