폰갭 설치 방법이 바뀐것은 찾을 수가 없어서 삽질을 했음
iOS도 테스트를 해야 하니 mac에서 진행, 공식문서에 윈도우에서 설정 방법이 있음
1. node 를 사용하여 설치 하니 node 를 설치함
2. 폰갭 사이트의 설명대로 npm 을 이용하여 설치
sudo npm install -g phonegap
3. 이 다음 부분을 몰라서 삽질을함 ㅡ.ㅡ;;
찾아본 여러 문서와 책과 비교해보면 아주 편리해졌음
이클립스에서 ADT환경이 구성되어 있는것으로는 안됨
안드로이드SDK가 Path에 잡혀 있어야함, 이하 공식문서 참고
touch ~/.bash_profile; open ~/.bash_profile
This will open the file in the your default text editor.
You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use "/Development/android-sdk-macosx" as the directory the SDK is installed in. Add the following line:
export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools
Save the file and quit the text editor.
Execute your .bash_profile to update your PATH.
source ~/.bash_profile
4. 프로젝트 생성, 빌드
$ phonegap create hello com.example.hello HelloWorld
$ cd hello
$ phonegap build android$ phonegap build ios
로그인하라고 나오면 환경 구성이 제대로 안된것임
$phonegap local build android
실행 시키면 에러문구에 적절하게 대응하면 된다.
5. platforms 디렉토리에 안드로이드 프로젝트 파일 생성
6. 이클립스에서 프로젝트를 불러와서 실행, iOS용은 xcode 에서 실행해보면 된다.
'지식창고' 카테고리의 다른 글
DextUpload 80004005 오류 해결 방법 (0) | 2013.11.27 |
---|---|
php 파일 인코딩으로 인한 삽질 (0) | 2013.11.27 |
sencha touch 2.2.1 (0) | 2013.09.12 |
C++ REST SDK (0) | 2013.08.29 |
그누보드 설치 오류 대처 방법 (0) | 2013.06.17 |