编译问题1:

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"
flex-2.5.39:严重内部错误,exec of /usr/bin/m4 failed
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

解决方法:

sudo apt-get install m4
sudo apt-get install  libxml2-utils

编译问题2:

/bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory 
当出现该问题时,通过阅读,并不是没有bison这个运行库,而是没有找到该库;

解决方法1:

sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev

解决方法2:

编译Android-5.1.1时出现bison找不到,但ls可以看的到。解决办法:
ubuntu 64位系统运行32位程序的问题,需要安装运行32位程序的兼容库
sudo apt-get install lib32ncurses5
sudo apt-get install lib32stdc++6
sudo apt-get install libc6:i386 libstdc++6:i386

解决方法3:

进入:/android_7.1.1_r27/prebuilts/sdk/tools
./jack-admin stop-server
./jack-admin start-server
export PATH=$PATH:~/android_7.1.1_r27/prebuilts/sdk/tools
如果提示没有找到:
./jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar

方法4:

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"
进入:/android_7.1.1_r27/prebuilts/sdk/tools
./jack-admin stop-server
./jack-admin start-server

方法5:

同步问题
https://github.com/sonyxperiadev/repo_update/issues/2
https://github.com/sonyxperiadev/repo_update

方法6:

https://stackoverflow.com/questions/49301627/android-7-1-2-armv7?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

export LC_ALL=C

编译问题3:emulator:未找到命令

原因:说下的原因,我的原因是之前编译过一次,然后过了几天我想运行下,
输入emulator 提示emulator:未找到命令。

解决办法也很简单,

就是把之前的编译执行的脚步再执行一遍:
$ source build/envsetup.sh
$ lunch 选择1
$ emulator

编译问题4:/usr/bin/env: "python": 没有那个文件或目录

apt-get --reinstall install python-minimal

只需要将 .repo/manifest.xml 把其中的 aosp 这个 remote 的 fetch 
从 https://gerrit.googlesource.com/git-repo
 改为 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/。

http://android.googlesource.com/platform/bionic

https://developer.sony.com/ja/develop/open-devices/guides/aosp-build-instructions/build-aosp-nougat-8-1-oreo-4-4#tutorial-step-4

You are using version4.0of make. Android can only be built by versions3.81and3.82

.没办法,只能降级回来了,先remove掉4.0的make:

sudo apt-get remove make
从[这里]去下载3.81的make安装包,我下载是i386的deb包。

下载后执行命令安装:

sudo dpkg -i make*.deb
至此,再执行编译,应该就没有问题了。

emulator:未找到命令

原因:说下的原因,我的原因是之前编译过一次,然后过了几天我想运行下,输入emulator 提示emulator:未找到命令。

  • 解决办法也很简单,就是把之前的编译执行的脚步再执行一遍:
  • $ source build/envsetup.sh $ lunch $ emulator

build/core/prebuilt.mk:83: *** recipe commences before first target。 停止。

降低make版本

http://ftp.gnu.org/pub/gnu/make/

下载的版本 make-3.82.tar.gz ,解压 tar zxvf make-3.82.tar.gz 获得文件夹make-3.82 ;

4、进入到make-3.82文件夹 使用如下命令:

 ./configure --prefix=/usr 

sudo make 

sudo make install

5、使用make --version查看当前版本,已经切换为3.82了。

libclearsilver-jni_intermediates/j_neo_util.o] 错误 1

sudo apt-get install lib64z1-dev libc6-dev-amd64 g++-multilib lib64stdc++6

V8CSSRuleList.h] 错误

results matching ""

    No results matching ""