Ubuntu9.10下编译Android源码
来源:互联网 发布:自己的淘宝等级怎么看 编辑:程序博客网 时间:2024/05/22 03:50
在 Ubuntu8.04下,应该一切很顺利,但是我装的是9.10版本,所以会有些问题。
先装jdk1.5,网上说1.6的有点小问题,所以我没装1.6,选择了1.5. 然后一边装必须的一些程序,apt-get install **** 很多乱七八糟的,网上能搜到,然后一边下载android源码。
源码的下载需要git,curl和repo,git和curl可以直接用apt-get install git-core curl就可以了
然后下载repo
curl http://android.git.kernel.org/repo >~/bin/repo
添加可执行权限
sudo chmod +x repo
初始化repo
repo init -u git://android.git.kernel.org/platform/manifest.git
如果只需要某一个版本,比如我只要cupcake
repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
然后建个目录,
mkdir android
进入
cd android
下载
repo sync
然后就等吧,大概两个G左右的内容,在获取39%的时候和95%的时候是最慢的,因为39%的有一百多M,95%的有差不多400M。
下载完之后,先不要make,因为还有几个问题:
1.如果直接make,会出现frameworks/policies/base/PolicyConfig.mk:22: *** No module defined for the given PRODUCT_POLICY (android.policy_phone). Stop.错误。
解决办法:
在build/tools/findleaves.sh中的第89行,
这一句find "${@:0:$nargs}" $findargs -type f -name "$filename" -print |
改为find "${@:1:$nargs-1}" $findargs -type f -name "$filename" -print |
2.frameworks/base/tools/aidl/AST.cpp:10: error: 'fprintf' was not declared in this scope的错误
解决办法:
下载gcc-4.3和g++-4.3
apt-get install gcc-4.3 g++-4.3
大约十多兆,然后
进入/usr/bin
cd /usr/bin
建个软连接
ln -s gcc-4.3 gcc
ln -s g++-4.3 g++
然后进入android目录下,执行make,就可以了。
我在虚拟机里面make的,分了1G内存给他,处理器50%,一共花了两个小时才编译完成。编译完成后,在android目录下的out文件夹中,就是结果,也有两个G左右。
在out/target/product/generic目录下,有三个img文件,system.img,ramdisk.img,userdata.img,这三个就是需要的android系统镜像文件,放到模拟器中运行就行了。
运行出来之后,进入设置里面,可以看到自己编译的标识呢,嘿嘿,很有成就感的。
- Ubuntu9.10下编译Android源码
- Ubuntu9.10下编译Android源码
- Ubuntu9.10下编译Android源码
- Ubuntu9.10下编译Android源码
- Ubuntu9.10编译android-2.1_r2源码
- Ubuntu9.10编译android-2.1_r2源码
- 在Ubuntu9.10下编译Android源代码
- Ubuntu9.10下获取Android源码
- AMD64位ubuntu9.04下编译Android源码
- ubuntu9.04下编译android源码遇到的问题
- android ubuntu9.10 源码的编译 Eclipse工程 Contacts编译 应用加载
- 把ubuntu9.10下的编译源码的步骤写下来,方便以后的查阅
- 把ubuntu9.10下的编译源码的步骤写下来,方便以后的查阅
- ubuntu9.10 下编译安装mysql
- ubuntu9.10下编译安装kscope1.6.2
- ubuntu9.10 编译freetype
- cupcake在ubuntu9.10下编译出错信息
- Ubuntu9.10-64bit 下 编译 OpenCv1.1pre1
- wmware虚拟机搭建oracle 集群RAC环境
- html
- hibernate通用方法
- MFC界面开发笔记
- Linux服务cannot change directory错误解决方法
- Ubuntu9.10下编译Android源码
- ORA-02291:parent key not found
- POJ3712Edges and More Edges
- android.webkit.WebView 使用 SINGLE_COLUMN layout algorithm 导致程序意外退出的解决办法
- 設計カバレッジで漏れの確認
- python 俄罗斯方块
- 阿里巴巴面试三题目其二的个人理解
- PowerDesigner12.5下载及破解
- busybox使用