ubuntu 搭建安卓系统编译环境

通用的环境软件 AP、CP

sudo apt-get update

sudo apt-get install git-core -y
sudo apt-get install gnupg -y
sudo apt-get install flex -y
sudo apt-get install bison -y
sudo apt-get install gperf -y
sudo apt-get install build-essential -y
sudo apt-get install zip -y
sudo apt-get install curl -y
sudo apt-get install zlib1g-dev -y
sudo apt-get install gcc-multilib -y
sudo apt-get install libc6-dev-i386 -y
sudo apt-get install lib32ncurses5-dev -y
sudo apt-get install x11proto-core-dev -y
sudo apt-get install libx11-dev -y
sudo apt-get install lib32z-dev -y
sudo apt-get install ccache -y
sudo apt-get install libgl1-mesa-dev -y
sudo apt-get install libxml2-utils -y
sudo apt-get install xsltproc -y
sudo apt-get install unzip -y
sudo apt-get install tofrodos -y
sudo apt-get install python-markdown -y
sudo apt-get install lib32readline6-dev -y
sudo apt-get install openssl -y
sudo apt-get install libssl-dev -y
sudo apt-get install libxml-simple-perl -y
sudo apt-get install openjdk-8-jdk -y
sudo apt-get install adb -y

sudo dpkg-reconfigure dash 
# selete no

注意: sudo dpkg-reconfigure dash 后会弹出窗口,要选择no

在这里插入图片描述

对于20.04以上的版本:

#for Ubuntu 20.04 and up
sudo apt-get install libncurses5 -y
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6

很多模块不做向下兼容的,也可能是我源码里有些需要版本选择没有做好

gcc 和 g++需要降级,9.4默认把warning当error,或者改Makefile,或者降级,8即可

sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 1024
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 1024
#1024为优先级
sudo update-alternatives --config gcc
#选gcc-8前面的编号
sudo update-alternatives --config g++

未完待续,20.04 CP端存在其它问题

  1. GenFds.py…
    error 7000: Fail to call minigzip, no output file was generated
    尚未解决
  2. clang-7: error: unknown argument ‘-mv5’, did you mean ‘-mv55’?
    虽然但是,包还是生成了,估计有坑
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值