qqjianyue代码工

砌java代码
posts - 62, comments - 9, trackbacks - 0, articles - 10
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Android compile 注意点

Posted on 2013-04-20 10:57 Qzi 阅读(296) 评论(0)  编辑  收藏
官方说明:http://source.android.com/source/initializing.html
环境:
Ubuntu 12.04 64bit
JDK6(installation: http://www.gaggl.com/2012/04/installing-java6-jdk-on-ubuntu-12-04/)

$ 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-pc-linux-gnu
$ python -V
Python 2.7.3
android 当前 mainfest version: 4.2


按照官方说明从下载到运行emulator,没有nexus,所以没做实际机器烧录。步骤请根据官方说明做,以下只列出过程遇到的问题:
1.repo sync
经常出现断线,网上有很多参考办法,我是每次忽略这些错误,直到运行完毕退出,我再重新运行:
repo sync -f
知道所有代码下载完毕(4.2的有16G)
2.每次跑emulator都要cd到代码目录先进行环境初始化
source build/envsetup.sh
lunch full-eng
3.emulator出错
$ emulator
emulator: WARNING: system partition size adjusted to match image file (229 MB > 200 MB)
Segmentation fault (core dumped)
改成用emulator-arm -partition-size 1024
full long command reference:
http://stackoverflow.com/questions/9022750/running-emulator-after-building-android-from-source

只有注册用户登录后才能发表评论。


网站导航: