安卓源码编译dddddd
编译源码内存不够
解决办法可以是增加虚拟机的内存,或者是增加swap的大小。
配置一个比较大的swap;
之后要在prebuild/sdk/tools/jack-admin 中修改一下jack-server的大小
adb工具
把adb的几个文件放在一个adb的文件夹下,然后添加在系统环境变量path里面添加路径即可
也可以进入源码目录android-sdk-linux_x86/tools 输入adb
也可以输入 source build/envsetup.sh,lunch 然后使用adb
Windows下 eclipse 安卓环境搭建 ndk
http://blog.csdn.net/zht666/article/details/29837777
安装Ubuntu 提示error 。。。 Previously Installed Packages
最后是通过erase disk and install 才解决的,安装过程需要联网
cd /etc/apt/
cp source.list source.list.bak
替换国内源
http://blog.csdn.net/w8708812/article/details/52098228
apt update
安装搜狗输入法
http://www.cnblogs.com/zhangfengfly/p/6867844.html
系统设置->语言支持”里面,选择fcitx 重启
找出并杀掉所有 apt-get 或者 apt 进程
https://linux.cn/article-8040-1.html?utm_source=weixin
Ubuntu1604 安装open jdk
http://blog.csdn.net/brokge/article/details/51454265
Ubuntu1404 安装open jdk8(不需要配置环境变量)
http://ubuntuhandbook.org/index.php/2015/01/install-openjdk-8-ubuntu-14-04-12-04-lts/
编译jack oom
http://blog.csdn.net/u012915455/article/details/52382630#51-jack-out-of-memory-error
=== gcc 切换 ===
http://blog.csdn.net/chenlycly/article/details/40478727
apt-get remove gcc-4.8
apt-get remove g++-4.8
apt-get install gcc-4.6 g++-4.6
apt-get install g++-4.6
ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
ln -s /usr/bin/g++-4.6 /usr/bin/g++
ls /usr/bin/gcc* -l
ls /usr/bin/g++* -l
一、添加软件源
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
二、安装版本的命令:
sudo apt-get install gcc-4.8 g++-4.8
apt-get install gcc-4.6 g++-4.6
root@focus:/home/tooan# cd /usr/bin/gcc
gcc gcc-ar gcc-nm gcc-ranlib
gcc-4.8 gcc-ar-4.8 gcc-nm-4.8 gcc-ranlib-4.8
gcc-5 gcc-ar-5 gcc-nm-5 gcc-ranlib-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 60
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
accr用命令行解压源码一直循环解压
Extracting android-7.0.0_r1
Sub items Errors: 1
http://www.saetechnologies.com/7-zip-sub-items-errors-1/
* 0523更新编译firefly-rk3399 安卓7.1.1
(在编译5.1的基础上成功编译了安卓6.0,编译安卓7.0需要open jdk 8)
mm编译系统app时先在common目录生成obj, 如果编译出错则product目录不会生成obj,成功才会有
如果app代码里改动小,编译时可能没有编到修改的东西,这时需要删除下面的目录了
/root/4412/android-4.2.2_r1/out/target/common/obj/APPS
/root/4412/android-4.2.2_r1/out/target/product/tiny4412/obj/APPS
* mt6735开发板安卓5.1源码编译
open JDK7
gcc 4.6
google推荐编译的库:
* java 版本切换
update-alternatives --config java
update-alternatives --config javac
安卓5.1
cat board_android5_6735.tar.bz2.a* | tar xj
gedit /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
apt-get update
=== Install google recommended packages ===
$ apt-get install -y git gnupg flex bison gperf build-essential
apt-get install -y zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev
apt-get install -y g++-multilib mingw32 tofrodos libgl1-mesa-dev python-markdown libxml2-utils xsltproc zlib1g-dev:i386
apt-get install -y libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386
改为
apt-get install -y libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dri:i386
如果报错
unity-control-center : Depends:libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks,this may be caused by held packages.
执行
apt-get autoremove libcheese-gtk23 libcheese7
再次
apt-get install -y libx11-dev:i386 libreadline6-dev:i386 __libgl1-mesa-dri:i386__
$ ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
=== Install open JDK 1.7 ===
1. Run below apt-get command to install the package
$ sudo apt-get -y install openjdk-7-jdk
2. Run below update-java-alternatives command to set open JDK 1.7 environment
$ update-java-alternatives -s java-1.7.0-openjdk-amd64
=== gcc 切换 ===
http://blog.csdn.net/chenlycly/article/details/40478727
apt-get remove gcc-4.8
apt-get remove g++-4.8
apt-get install gcc-4.6
apt-get install g++-4.6
ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
ln -s /usr/bin/g++-4.6 /usr/bin/g++
ls /usr/bin/gcc* -l
ls /usr/bin/g++* -l
=== 创建swap分区 ===
dd if=/dev/zero of=/swapfile bs=1G count=8
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
gedit /etc/fstab
添加
/swapfile none swap sw 0 0
swapon -s
source build/envsetup.sh
#lfull_lentk6735_65c_l1-eng
source mbldenv.sh
make -j8 2>&1 | tee build.log
make -j8 systemimage 2>&1 | tee build.log
make -j8 2>&1 | tee build.log
* mt6735开发板安卓6.0源码编译
open JDK7
gcc 4.6
source build/envsetup.sh
lunch full_la68_A40-eng
source mbldenv.sh
make -j8 2>&1 | tee build.log
make -j8 systemimage 2>&1 | tee build.log
make -j8 2>&1 | tee build.log
* 安卓7.0源码编译
Ubuntu1404 LTS 64bit
http://ubuntuhandbook.org/index.php/2015/01/install-openjdk-8-ubuntu-14-04-12-04-lts/
http://blog.csdn.net/vrix/article/details/53976540
sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zip
lunch 2
aosp-arm64-eng
Jack “Out of memory error”
http://blog.csdn.net/u012915455/article/details/52382630#51-jack-out-of-memory-error