排坑之android 运行环境搭建及编译运行
来源:互联网 发布:女用情趣用品 知乎 编辑:程序博客网 时间:2024/05/18 17:03
android soruce guide html: http://source.android.com/source/initializing.html
官网的一些介绍过于笼统,个人觉得有必要进行一次tips 更正。
1、硬盘大小的准备吐槽
Note: The source download is approximately 8.5GB in size.You will need over 30GB free to complete a single build, andup to 100GB (or more) for a full set of builds.
8.5G太小了,现在的高版本安卓至少要准备20G的代码空间。如果按照多下1套的代码量来看,代码就得准备40G左右,加上2*30=60G的代码中间件生成空间。已经是100G了,
加上ccache最大100G,那基本得准备200G的硬盘空间。这个空间的准备对于安装双系统(xp+ubuntu以及win7+ubuntu)的同学来讲都是需要认真估算准备的。
打个小广告:
win7+ubuntu双系统安装
xp硬盘上安装ubuntu12.04双系统
2、Installing the JDK吐槽
只告诉你这些,但是并没有清楚的告诉尔等,老版本的jdk1.6是需要使用sun jdk而不是openjdk.我边写边想揍人!
Java 7: For the latest version of Android
To develop older versions of Android, download and install the corresponding version of theJava JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo
3、编译链安装环境未更新说明
ubuntu12.04.4版本安装 libgl1-mesa-glx:i386的时候提示如下,应该将libglapi-mesa:i386加入依赖关系中。
下列软件包有未满足的依赖关系:
libgl1-mesa-glx:i386 : 依赖: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.7)
推荐: libgl1-mesa-dri:i386 (>= 7.2)
4、repo吐槽
To install Repo:
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin$ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$ chmod a+x ~/bin/repo
For version 1.17, the SHA-1 checksum for repo is ddd79b6d5a7807e911b524cb223bc3544b661c28
For version 1.19, the SHA-1 checksum for repo is 92cbad8c880f697b58ed83e348d06619f8098e6c
For version 1.20, the SHA-1 checksum for repo is e197cb48ff4ddda4d11f23940d316e323b29671c
For version 1.21, the SHA-1 checksum for repo is b8bd1804f432ecf1bab730949c82b93b0fc5fede
被墙不是你的错,但是麻烦你将以前的一些repo版本项目删除可以否,直接curl googleapis网址失败,但是搜索到一个旧的repo维护googlesource项目,下载了一个
version 1.19的repo,在repo sync的时候总是报gpg:无法检查签名:找不到公钥。后来用SHA-1 了一下下载到的1.19版本果然 SHA-1 checksum与最新的说明中不一致了,坑爹!5、代理设置吐槽
Troubleshooting network issues
When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:
$ export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>$ export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
仅仅是这样设置是远远不够的,goagent怎么翻墙代理我就不说了。关键是:git http_proxy https_proxy你压根就没提啊!!!你那人家怎么代理下载!
如何使用代理帐号下载Android源代码
git config --global http.proxy http://127.0.0.1:8087(以你自己的代理为准)
git config --global https.proxy http://127.0.0.1:8087(以你自己的代理为准)
6、模拟器的运行(肯无止境)
source build/envsetup.sh
lunch aosp_arm-eng
make -j4
Emulate an Android Device
The emulator is added to your path automatically by the build process. To run the emulator, type
$ emulator
第一次是没错啊!可以运行模拟器,但是你多讲几句话会死人吗?我关掉命令行下次重新想启动模拟器的话,麻烦告诉我等:(还需要
source build/envsetup.sh
以及launch步骤好不好)
source build/envsetup.sh
lunch aosp_arm-eng
$ emulator
- 排坑之android 运行环境搭建及编译运行
- android单元测试环境搭建及运行
- Android -- 环境搭建及程序运行
- 搭建android运行环境
- ubuntukylin编译运行环境搭建
- Ubuntu下Android开发环境搭建及源代码下载、编译、运行
- JAVA环境搭建及运行
- Python 环境搭建及运行
- Android运行环境的搭建
- Android NDK开发(一)环境搭建及运行示例
- Android NDK开发(一)环境搭建及运行示例
- sakai开发环境及运行环境搭建
- 手机端搭建Java编译运行环境
- Java编译,运行与环境搭建
- Java编译,运行与环境搭建
- centos7 go编译运行环境搭建
- android jitsi编译及运行
- android O 编译及运行
- 利用Dreamweaver开发JSP的方法
- opencv提取unifor LBP算子特征
- 关于log4j
- 字符串拷贝函数
- 八皇后问题
- 排坑之android 运行环境搭建及编译运行
- js 获得url中的get参数
- 找不到方法的异常: java.lang.NoSuchMethodException: No applicable method found
- CAMSHIFT 算法原理解读 :连续自适应Mean Shift 算法
- Nyoj 64 鸡兔同笼
- Dedecms常用标签整理(收藏用)
- 计算n的阶乘
- 【C++ STL学习之八】逆向迭代器reverse_iterator
- 上传图片