Android源码编译--整理

1、android源码编译与开发:问题记录

CM9源码下载和编译http://www.cnblogs.com/qianxudetianxia/archive/2012/05/27/2512447.html


补充:

问题:

Checking build tools versions...

************************************************************

You are attempting to build with the incorrect version

of java.

 

Your version is: java version "1.6.0_39".

The correct version is: 1.5.

 

Please follow the machine setup instructions at

    http://source.android.com/download

************************************************************

************************************************************

You are attempting to build with the incorrect version

of javac.

 

Your version is: javac 1.6.0_39.

The correct version is: 1.5.

 

Please follow the machine setup instructions at

    http://source.android.com/download

************************************************************

解决:

注意:这里我要说明一下,CM9的编译脚本相对于官方源码的编译脚本忽略了或者说处理了一些可能出现的错误的地方,比如说这里java版本的检测,如果是open jdk的话,官方就编译不过,其实是一样的,只需要修改一下脚本(build/core/main.mk),找到检测java+javac版本的地方:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 |  grep  '^java .*[ "]1\.6[\. "$$]' )
ifneq ($(shell java -version 2>&1 |  grep  -i openjdk),)
java_version :=
endif
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build  with  the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
$(info The correct version is: Java SE 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html)
$(info ************************************************************)
#$(error stop) //如果确定已经安装正确的jdk的话,这句去掉,让编译继续
endif


2、Android源码mm模块编译 & mm编译apk


3、Android系统权限和root权限

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小涵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值