티스토리 뷰

Android

[Android] 자바(JDK, 환경변수) 설치 및 이클립스 + SDK ADT Bundle, 안드로이드 개발환경 구축/설치

rhys
반응형

DroidJava


(1~2까지는 Java 개발환경을 만드는 방법과 동일합니다)


3에는 루팅이나 직접제어에 쓰이는 ADB Shell을 담은, SDK도 포함됩니다.




1. JDK(Java Developer's Kit) 설치


    

Oracle Binary Code License Agreement for Java SE


http://www.oracle.com/technetwork/java/javase/downloads/index.html


 위 링크로 들어가 Java Platform(JDK)의 최신버전(현 7u40)을 자신의 운영체제에 맞게 다운받아줍니다. 만약 자신의 운영체제가 32비트인지 64비트인지 모른다면 아래 글을 참조해주세요.






2. 시스템 환경변수 설정



시작 - '환경 변수' 검색


환경 변수(N)를 설정하는 창은 위와 같은 방법으로 간단히 접근하거나,

'내 컴퓨터' 우클릭 후 속성 또는 '윈도우 키 + Pause/Break 키'를 통해 들어간 시스템 창의 '고급 시스템 설정'에서 찾을 수 있습니다.



시스템 속성 - 고급 - 환경 변수(N)




C:\Program Files\Java


C:\Program Files\Java에서 설치된 jdk의 버전을 확인



시스템 변수(S) - 새로 만들기(W)


변수 이름(N): JAVA_HOME

변수 값(V): C:\Program Files\Java\jdk1.7.0_21


위에서 확인한 jdk의 경로를 입력!




시스템 변수(S)에서 변수 Path, 편집(I)


변수 값(V)의 마지막에 세미콜론(;)을 붙여준 뒤 %JAVA_HOME%\bin을 추가로 붙여줍니다.





시스템 변수(S) - 새로 만들기(W)

변수 이름(N): CLASSPATH

변수 값(V): %JAVA_HOME%\lib\tools.jar




Success!


이제 cmd창에 java나 javac를 쳐보면 반응이 있습니다.




여기에 추가로 adb를 자주 사용하므로, Path에


C:\Android\adt-bundle-windows-x86_64-20130917\sdk\platform-tools도 넣어주면 좋습니다.





3. Google ADT Bundle 설치


구글 안드로이드 개발자 사이트(http://developer.android.com/sdk/index.html)에서 제공하는 ADT Bundle을 운영체제에 맞추어 설치.



Download the SDK - ADT Bundle for Windows


Eclipse + ADT plugin / Android SDK Tools / Android Platform-tools

The latest Android platform / The latest Android system image for the emulator




Setting Up the ADT Bundle

The ADT Bundle provides everything you need to start developing apps, including a version of the Eclipse IDE with built-inADT (Android Developer Tools) to streamline your Android app development. If you haven't already, go download theAndroid ADT Bundle. (If you downloaded the SDK Tools only, for use with an existing IDE, you should instead read Setting Up an Existing IDE.)


Install the SDK and Eclipse IDE

  1. Unpack the ZIP file (named adt-bundle-<os_platform>.zip) and save it to an appropriate location, such as a "Development" directory in your home directory.
  2. Open the adt-bundle-<os_platform>/eclipse/ directory and launch eclipse.

That's it! The IDE is already loaded with the Android Developer Tools plugin and the SDK is ready to go. To start developing, read Building Your First App.

Caution: Do not move any of the files or directories from the adt-bundle-<os_platform> directory. If you move theeclipse or sdk directory, ADT will not be able to locate the SDK and you'll need to manually update the ADT preferences.


Additional information

As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the library for Google Play In-app Billing. To install more packages, use the SDK Manager.

Everything you need to develop Android apps is on this web site, including design guidelinesdeveloper trainingAPI reference, and information about how you can distribute your app. For additional resources about developing and distributing your app, see the Developer Support Resources.




안드로이드 공식 페이지의 안내와 같이,


C:\Android


원하는 적당한 위치에 압축을 풀어주세요.




C:\Android\adt-bundle-windows-x86_64-20130917\eclipse




Workspace: C:\Android\workspace


Use this as the default and do not ask again




4. SDK Manager에서 추가 다운로드


아까 압축을 푼 폴더를 보면, 귀여운 아이콘을 달고 있는 SDK Manager.exe 파일이 있습니다.

지금 이 툴을 통해 다운받아야 할 것들은 다음과 같습니다.



Tools

Android 4.3 (API 18) (가장 최신 버전)

Android 2.3.3 (API 10) (진저브레드)

Extras 중 원하는 것



SDK Manager.exe


전 이렇게 골랐습니다.



리스트가 이렇게 뜨지 않을 경우 Tools-Options에서 https://가 아닌 http://를 이용하도록 Force하라던데,


관련 이슈 - https://code.google.com/p/android/issues/detail?id=21359



제 회사 컴퓨터의 경우 뭘 해도 되지 않았습니다. 집은 잘 되어서 다행이네요.


해결했습니다. 프록시 탓이었네요: 링크



잘 되셨나요? 이렇게 하면 개발환경 구축은 끝이 납니다.




+Android 4.3만이 아닌 Android 2.3.3 (API 10)도 설치하는 이유

 최신 버전의 플랫폼의 기능들을 이전 버전의 플랫폼에서 지원하지 않는 경우가 있기 때문입니다. 대부분의 사용자가 사용할 수 있도록 이전 버전의 플랫폼으로 개발하는 것이죠. 이는 진저브레드의 점유율과 관계가 있습니다.




반응형

댓글