ubuntu16.04 编译安卓4.2
1. root@ge-Lenovo:/usr/lib/jvm# cd /home/material/install/jdk/
jdk-6u29-linux-x64.bin jdk-6u45-linux-x64.bin
2. root@ge-Lenovo:/usr/lib/jvm# cp jdk-6u29-linux-x64.bin /usr/lib/jvm/.
3. root@ge-Lenovo:/usr/lib/jvm# cd /usr/lib/jvm/
ls jdk*
jdk-6u29-linux-x64.bin
4. root@ge-Lenovo:/usr/lib/jvm# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
5. root@ge-Lenovo:/usr/lib/jvm# ./jdk-6u29-linux-x64.bin
6. root@ge-Lenovo:/usr/lib/jvm# vim /etc/profile
......
done
unset i
fi
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_29
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:$PATH
7. root@ge-Lenovo:/usr/lib/jvm# source /etc/profile
//只在当前窗口临时起作用
8. root@ge-Lenovo:/usr/lib/jvm# java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
9. 解决编译过程中的各种错误
×××××××××××××××××××××××××××××××××
首先确定自己 PC 上的 make 3.8、gcc 4.4、g++ 4.4 版本
如果不是,分别到 问题 2 、问题 5 部分解决
×××××××××××××××××××××××××××××××××
问题 1:
/bin/bash: bison: command not found
解决方法:
使用sudo apt-get install bison
这个包会依赖如下包:
libbison-dev libsigsegv2 m4 ,apt-get 会自动安装这些依赖包.
问题 2:
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: * You are using version 4.1 of make.
build/core/main.mk:47: * Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: * see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping。 停止。
解决办法:
如何实现make工具的降版本?
1. 下载make 3.81
make工具的官方镜像地址:http://ftp.gnu.org/gnu/make/ ,下载指定版本的make源码包,这里我们下载make-3.81.tar.gz。
2. 解压make源码包
root@ge-Lenovo:~/桌面/make-3.81# tar -xzvf make-3.81.tar.gz
root@ge-Lenovo:~/桌面/make-3.81# rm make-3.81.tar.gz
root@ge-Lenovo:~/桌面/make-3.81# cd make-3.81/
3. 执行configure
root@ge-Lenovo:~/桌面/make-3.81# ./configure
4. 执行build.sh
root@ge-Lenovo:~/桌面/make-3.81# sh build.sh
5. 安装make
root@ge-Lenovo:~/桌面/make-3.81# make install
6. 替换旧版本make
root@ge-Lenovo:~/桌面/make-3.81# cp make /usr/bin/make
7. 查看版本
root@ge-Lenovo:~/桌面/make-3.81# make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-unknown-linux-gnu
问题 3:
找不到xsltproc命令:
解决方法:
root@ge-Lenovo:/opt/FriendlyARM/tiny4412/android-4.2.2_r1# sudo apt-get install xsltproc
问题 4:
/bin/bash: flex: command not found
解决方法:
root@ge-Lenovo:/opt/FriendlyARM/tiny4412/android-4.2.2_r1# sudo apt-get install flex
问题 5:gcc 和 g++ 版本不是 4.4
解决方法:
首先添加ppa到库:
1. sudo add-apt-repository ppa:ubuntu-toolchain-r/test
2. sudo apt-get update
安装:
apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib
进入/usr/bin
root@ge-Lenovo:/usr/bin# ls -l gcc*
root@ge-Lenovo:/usr/bin# rm gcc
同理
root@ge-Lenovo:/usr/bin# ls -l g++*
root@ge-Lenovo:/usr/bin# rm g++
创建新版本程序的软链接
root@ge-Lenovo:/usr/bin# ln -s gcc-4.4 gcc
root@ge-Lenovo:/usr/bin# ln -s g++-4.4 g++
问题 6:
缺少库 libz.so.1
解决办法:
sudo apt-get install lib32z1
问题 7:
sh: 1: sh: 1: gperf: not found
gperf: not found
解决办法:
sudo apt-get install gperf
问题 8:
Can't locate Switch.pm in @INC (you may need to install the Switch
module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2
/usr/local/share/perl/5.18.2 /usr/lib/ perl5 /usr/share/perl5
/usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at
external/webkit/Source/WebCore/make-hash-tools.pl line 23
解决办法:
sudo apt-get install libswitch-perl
问题 9:
/bin/bash: xmllint: 未找到命令
make: *** [out/target/product/generic/system/etc/apns-conf.xml] 错误 127
解决办法:
apt-get install libxml2-utils
10. gen-img-生成img
[root@localhost android-4.2.2_r1]# pwd
/opt/FriendlyARM/tiny4412/android-4.2.2_r1
1. ./gen-img.sh
+ '[' 0 -ne 0 ']'
gen ramdisk.img
gen ramdisk-u.img
./gen-img.sh: line 39: mkimage: command not found
2. cp /opt/install/mkimage /usr/bin/.
3. ./gen-img.sh
ubuntu16.04 编译安卓4.2的更多相关文章
- Ubuntu16.04编译安装php
#Ubuntu16.04编译安装php Ubuntu16.04上面搭建基于Nginx的php服务.Nginx使用apt直接安装的. sudo apt install nginx php的安装部署步骤主 ...
- Ubuntu16.04编译Android6.0/cm13.0教程及相关错误解决办法
一.必备工作 1.安装依赖库 sudo apt--dev libesd0-dev git-core gnupg flex bison gperf build-essential zip curl zl ...
- ubuntu16.04编译安装mysql-boost-5.7.21并编译成php扩展测试与使用
我之前的文章已经改造了自定义MVC框架中的工具类(验证码,图片上传,图像处理,分类)4个类,接下来,就要改造模型类,模型类肯定要连接数据库,由于我的Ubuntu Linux是裸装的php(目前只编译了 ...
- Ubuntu16.04编译安装tensorflow,2018最新血泪踩坑之后的全面总结!绝对成功!【转】
本文转载自:https://blog.csdn.net/pzh11001/article/details/79683133 大家好,我是 (深度学习硬件DIY总群)(719577294)群主: ...
- ubuntu16.04编译QT5.6所依赖的库
首先在QT的根目录下,阅读README文件! 里面介绍了ubuntu环境下,编译该版本的QT需要安装的包 New dependencies in Qt 5 ------------------- ...
- Ubuntu16.04编译tensorflow的C++接口
原文:https://www.bearoom.xyz/2018/09/27/ubuntu1604buildtf4cpp/ 之前有一篇介绍到在windows下利用VS2015编译tensorflow的C ...
- Ubuntu16.04编译libjpeg-turbo库
一.环境依赖 CMake v2.8.12或以后 NASM or YASM (if building x86 or x86-64 SIMD extensions),如果使用NASM, 依赖2.10之后版 ...
- Ubuntu16.04编译Openjdk8,笔者亲测编译成功
现在很多语言都不开发运行环境了,都选择在JRE上运行,足以证明JVM的优越.你精通了JVM,未来的路才可能走得轻松.这篇文章是你走近jvm的第一篇,编译Openjdk8源码 编译环境 操作系统:Ubu ...
- ORB_SLAM2 Ubuntu16.04编译错误
Ubuntu14.04一切正常,迁移到Ubuntu16.04后编译报错,提示: /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:745:3: ...
随机推荐
- OC 线程操作1 - pthread
#import "ViewController.h" #import <pthread.h> //1.需要包含这个头文件 @interface ViewControll ...
- Django创建模型,迁移数据
1.在models.py文件中添加代码 class notice(models.Model): notice_title = models.CharField(max_length=255) noti ...
- linux命令学习之:vim
1. 关于Vim vim是我最喜欢的编辑器,也是linux下第二强大的编辑器. 虽然emacs是公认的世界第一,我认为使用emacs并没有使用vi进行编辑来得高效. 如果是初学vi,运行一下vimtu ...
- HttpClient上传文件
1.上传客户端代码: public static void upload() { CloseableHttpClient httpclient = HttpClients.createDefault( ...
- Query to find the eligible indexes for rebuilding
Query to find the eligible indexes for rebuilding The following script can be used to determine whic ...
- 一行代码轻松搞定各种IE兼容问题,IE6,IE7,IE8,IE9,IE10
在网站开发中不免因为各种兼容问题苦恼,针对兼容问题,其实IE给出了解决方案Google也给出了解决方案百度也应用了这种方案去解决IE的兼容问题? 百度源代码如下: <!Doctype html& ...
- 9.13 h5日记
9.13 面试题 为什么两个P出此案的效果不同,原因是 浏览器在解析第二个P的时候,因为字母没有空格,浏览器会认为这个单词没有打完,所以不会换行. 列表 ul ol dl li 1.无序列表 ul ( ...
- ftp上传文件异常
ftp一个服务器 如果是22端口 ssh-2.0-openssh_4.3 ,是什么意思? ftp服务用的是20.21端口,客户端添加ftp信息的时候输入的是21端口 ssh服务用的是22端口,应用于远 ...
- 放大Button热区的方法哟
//添加图片不能用backgroundimage [btn setImage:image5 forState:]; //然后 btn.imageEdgeInsets = UIEdgeInsetsMak ...
- POJ1659 Frogs' Neighborhood(青蛙的邻居) Havel-Hakimi定理
Frogs' Neighborhood Time Limit: 5000MS Memory Limit: 10000K Total Submissions: 8729 Accepted: 36 ...