注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

时间记录器

记录我的Linux、Android学习之路

 
 
 

日志

 
 

Android Tools Project - SDK  

2012-06-01 00:32:34|  分类: Android |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

from: http://tools.android.com/build

Build Overview

Setup

First, you'll need to install the prerequisites for your platform. This means you'll have git, a C compiler, etc. There are quite a few steps here, and it's all platform dependent, so go to the official build instructions where we have detailed instructions:  http://source.android.com/source/initializing.html.

Pay careful attention. For example, on a Mac you will need to work on a case-sensitive filesystem image, which is not the OSX default. One other Mac specific tip, which is not in the main Android page yet, is that Apple's recent JDK update "broke" the Android build on Snow Leopard since the build uses JNI. The location of the JNI header file changed or disappeared with the JDK update, so you now need to go to Apple and get the developer SDK, JavaDeveloper.pkg from http://connect.apple.com.


Once you have everything configured, check out the source code using the following commands in a bash shell:

$ mkdir android
$ cd android
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo sync


During the repo init command, it will ask you for your name and e-mail address; these will be used later if you decide to check in changesets and upload them for review.

For full, up to date instructions please look at http://source.android.com/source/downloading.html.

Builing the Linux and MacOS SDK

Now you are ready to build. While you could just type "make", this is where our SDK build instructions diverge a bit from the default build.

In a bash shell, run these commands:

$ . build/envsetup.sh
$ lunch sdk-eng
$ make sdk

That will run for quite a while and build a full SDK. The result is located at
   out/host/platform/sdk/android-sdk_eng.username_platform-x86/


Building the Windows SDK

Full Windows SDK builds are only supported on Linux -- most of the framework is not designed to be built on Windows so technically the Windows SDK is build on top of a Linux SDK where a few binaries are replaced.

Setup:
$ sudo apt-get install mingw32 tofrodos

mingw32 is the cross-compiler, tofrodos adds a unix2dos command

To build:

$ . build/envsetup.sh
$ lunch sdk-eng
$ make win_sdk

Note that this will build both a Linux SDK then a Windows SDK. The result is located at
   out/host/windows/sdk/android-sdk_eng.username_windows/



Next steps

The next step is preparing your setup depending on which project you want to work on:
  • To set up your Eclipse environment to build, edit and debug the Eclipse plug-ins for Android, see the "Building the Eclipse-Based Tools" document.
  • Traceview, Hierarchy Viewer and DDMS are all setup as follows:
    • The core logic resides in the Java projects under sdk/traceview, sdk/hierarchyviewer2 and sdk/ddms respectively. Import these projects into Eclipse.
    • The above projects generate jar files that are then referenced by their corresponding plugins. traceview-plugin, hierarchyviewer-plugin and ddms-plugin, all of which are present under sdk/eclipse/plugins.
  • TODO: add instructions to work on emulator.
  评论这张
 
阅读(484)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017