– Android 환경에서 개발 하다 보면 가끔 Full Source나 NDK를 이용하기 위하여 native code를
Build해야 될 일이 발생한다.
이때 주의해야 될 사항이 있다.
Build시에 단말용으로 Build할 것인지 Emulator용으로 Build할 것인지 명시적으로 선언해
주어야 이후에 Linking Error를 피할 수 있다. (Default는 Emulator용으로 Build된다.)
Build Target을 설정하는 명령어는 lunch다.
Initialize
Initialize the environment with the envsetup.sh
script. Note that replacing “source” with a single dot saves a few characters, and the short form is more commonly used in documentation.
1 2 |
$ source build/envsetup.sh |
or
1 2 |
$ . build/envsetup.sh |
Choose a Target
Choose which target to build with lunch
. The exact configuration can be passed as an argument, e.g.
1 2 |
$ lunch full-eng |
The example above refers to a complete build for the emulator, with all debugging enabled.
If run with no arguments lunch
will prompt you to choose a target from the menu.
All build targets take the form DEVICE-BUILDTYPE, where the DEVICE is a codename referring to the particular hardware:
Codename | Device |
---|---|
passion | Nexus One |
crespo | Nexus S |
generic | emulator |
답글 남기기
로그인을 해야 댓글을 남길 수 있습니다.