Phonegap Cordova 설치 창
phonegap / cordova에 대한 문서는 끔찍합니다. Windows 환경에 PhoneGap 3.0을 설치하기 만하면 성공하지 못합니다.
아래는 내 단계와 실패 지점입니다. 누구든지 솔루션에 대해 조언 할 수 있습니까?
지침 에 따르면 :
- Node.js 설치 (SUCCESSFUL)
- nodes.js에서 :
install -g cordova
( 성공 ) - 플랫폼 추가 :
cordova platform add wp8
(NOTHING HAPPENS) - phonegap으로 시도하십시오 :
phonegap install wp8
(오류 프로젝트 디렉토리를 찾을 수 없습니다)
" Windows Phone 8 플랫폼 안내서 "에서
- Windows SDK 설치 (성공)
- "[PhoneGap의 최신 사본을 다운로드하여 추출하십시오. lib \ windows-phone-8 \ wp8 하위 폴더에서 작업하게됩니다. lib \ windows-phone-8 \ wp7에는 Cordwo의 Windwos Phone 7 버전이 포함되어 있습니다."
허?!?! 디렉토리는 어디에 있습니까?!?! 따라서 문서화되지 않은 phonegap 디렉토리를 AppData \ Local에 묻었으며 libs 디렉토리가 있지만 WP8 하위 폴더는 없습니다. 어디에서 설치합니까? 아마도 위의 add platform 명령이지만 아마도 새 명령 프롬프트로 돌아갑니다.
phonegap 명령을 사용해 보았습니다. phonegap plaform add wp8
오류- '플랫폼 추가 wp8'은 (는) 노드가 아닙니다.
나는 오픈 소스를 얻었지만 이것은 잔인한 스파게티 참조 문서입니다. 누구나 WP8 용 3.0을 성공적으로 설치할 수 있다면 어떤 포인터라도 도움이 될 것입니다.
몇 시간의 좌절 후 ... 여기 내가 발견 한 것이 있습니다.
- 설치 문서 와 모든 명령 행 node.js를 무시하십시오 (정말로 시간을 낭비하게됩니다).
- github로 이동하여 PhoneGap 마스터 .zip을 다운로드하십시오.
- 그 zip에는 window phone 등의 플랫폼 용 프로젝트 파일이 있습니다. 그 템플릿을 사용하십시오.
그러한 쉬운 프로세스가 어떻게 문서화를 악화시킬 수 있는지 모르겠습니다. 마치 변호사에 의해 작성된 것처럼.
나는 같은 문제에 직면하여 Stack Overflow 에보 고 된 문서 와 다른 문제 를 읽음으로써 한 시간 동안 통과하려고 노력 했지만 그에 대한 답을 찾지 못했습니다. 따라서 Windows Machine에서 phonegap / cordova를 성공적으로 실행하기위한 가이드입니다.
다음과 같이하세요
- http://nodejs.org/ 에서 node.js를 다운로드하여 설치 하십시오.
- 명령을 실행하거나
npm install -g phonegap
(phonegap 설치의 경우) 명령을 실행하십시오npm install -g cordova
(Cordova 설치의 경우). 설치가 완료되면 다음을 확인할 수 있습니다.
C : \ Users \ binaryuser \ AppData \ Roaming \ npm \ cordova-> C : \ Users \ binaryuser \ AppData \ Roaming \ npm \ node_modules \ cordova \ bin \ cordova cordova@3.0.9 C : \ Users \ binaryuser \ AppData \ Roaming \ npm \ node_modules \ cordova ├── ncallbacks@1.0.0 ├── open@0.0.3 ├── colors@0.6.2 ├── semver@1.1.0 ├── shelljs@0.1.2 ├── follow-redirects@0.0.3 (밑줄 @ 1.5.2) ├── elementtree@0.1.3 (sax@0.3.5) ├── optimist@0.6.0 (wordwrap@0.0.2, minimist@0.0.2) ├── xcode@0.5.1 (node-uuid@1.3.3, pegjs@0.6.2) ├── glob@3.2.6 (inherits@2.0.1, minimatch@0.2.12) ├── plist@0.4.3 (xmlbuilder@0.4.2, xmldom@0.1.16) ├── tar@0.1.18 (inherits@2.0.1, block-stream@0.0.7, fstream@0.1.24) ├── prompt@0.2.7 (revalidator@0.1.5, pkginfo@0.3.0, read@1.0.5, utile@0.1.7, winston@0.6.2) ├── request@2.22.0 (json-stringify-safe@4.0.0, aws-sign@0.3.0, qs@0.6.5, oauth-sign@0.3.0, forever-agent@0.5.0, 쿠키 -jar@0.3.0, tunnel-agent@0.3.0, mime@1.2.11, node-uuid@1.4.1, http-signature@0.10.0, hawk@0.13.1, form-data@0.0.8 ) ├── express@3.0.0 (methods@0.0.1, fresh@0.1.0, range-parser@0.0.4, crc@0.2.0, cookie@0.0.4, commander@0.6.1, debug@0.7 .2, mkdirp@0.3.3, send@0.1.0, connect@2.6.0) ├── ripple-emulator@0.9.18 (connect-xcors@0.5.2, colors@0.6.0-1, accounting@0.3.2, request@2.12.0, moment@1.7.2, express@3.1.0 ) ├── npm@1.3.11 └── plugman@0.11.0 (ncallbacks@1.1.0, osenv@0.0.3, bplist-parser@0.0.4, underscore@1.4.4, semver@2.0.11, dep-graph@1.1.0, elementtree @ 0.1.5, xcode@0.6.1, nopt@1.0.10, rc@0.3.0, tar.gz@0.1.1, npm@1.3.4)
위 줄에서 파일이 언급 된 경로를 볼 수 있습니다. 해당 경로를 복사하십시오. 제 경우에는
C:\Users\binaryuser\AppData\Roaming\npm\cordova
그렇게 사용cd C:\Users\binaryuser\AppData\Roaming\npm\
하고 입력하십시오cordova
. 거기, 마침내 작동합니다.- 때문에
-g
키 값이 작동하지 않습니다 당신은 환경 변수 경로를 설정 한 :- Win+를 누르 Pause|Break거나 마우스 오른쪽 버튼을 클릭
Computer
하고을 선택합니다Properties
. Advanced system settings
왼쪽을 클릭하십시오 .- 탭
Environment Variables
아래를 클릭Advanced
하십시오. PATH
변수를 선택 하고을 클릭하십시오Edit
.- 위에서 언급 한 경로를 값 필드에 복사하고을 누릅니다
OK
.
- Win+를 누르 Pause|Break거나 마우스 오른쪽 버튼을 클릭
이 답변은 처음 여기에 게시되었습니다 : cordova / phonegap does not make android directory
Cordova 3.3.0이 출시되면서 PhoneGap 팀이 이름 혼동을 해결하려고합니다. cordova
대신 명령을 사용하는 사람들을 권장하도록 설명서가 업데이트되었습니다 . 더 이상 명령을 사용하지 마십시오
.
phonegap
다음은 문제없는 설정을 보장하기위한 새로운 설치 안내서입니다.
Cordova를 설치하십시오 (지금부터 PhoneGap이라는 이름은 잊어 버리십시오). PC의 경우 :
C :> npm install -g 코르도바
명령 프롬프트에서 다음을 사용하여 프로젝트를 만들 폴더로 이동하십시오.
cordova hello com.example.hello HelloWorld를 작성하십시오. CD 안녕하세요
지원할 OS를 정의하십시오 (예 :
코르도바 플랫폼 추가 wp8
플러그인을 설치하십시오 (필요한 경우). 예를 들어 다음을 원합니다.
cordova 플러그인 추가 org.apache.cordova.device 코르도바 플러그인 추가 org.apache.cordova.camera 코르도바 플러그인 추가 org.apache.cordova.media-capture cordova plugin add org.apache.cordova.media
- Finally, generate the app using:
cordova build wp8
Here is a link to the
PhoneGap
Cordova 3.3.0 Documentation http://docs.phonegap.com/en/3.3.0/guide_cli_index.md.html#The%20Command-Line%20Interface
I faced this same error too. And i even tried downloading the PhoneGap master from GitHub,but i found out that what i got was Phonegap 2.9. I eventually had to download the Cordova 3 Source
Follow this steps to get it.
- Download and unzip the Cordova 3 Source
- Run the template.bat in the cordova-wp8 folder
- Copy the generated Zip files to your Visual studio template folder
Phonegap Cordova Installation on Windows
Requirements
- Eclipse + ADT Plugin
- Android SDK Tool
- Android Platform Tools
- Latest PhoneGap zip folder. Extract its contents.
Supported Android Devices
Android 2.2 Android 2.3 Android 4.x Phonegap Cordova Installation
Set PATH environment variable for android
From desktop, right click My Computer and click Properties.
Click Advance System Settings link in the left column.
In the system properties window click the environment variables button.
Select the PATH variable from the System variables section. Select the Edit button. You need to add the path to your Android SDK platform-tools and tools directory. For Example: D:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools;D:\adt-bundle-windows-x86_64-20130219\sdk\tools Save your Edit. Close the Environment Variable dialog.
- Additionally, you may need to include %JAVA_HOME%\bin to your PATH as well. To check to see if this is required run a command prompt and type java. If the program could not be found add %JAVA_HOME%\bin to the PATH. You may need to specify the full path instead of using %JAVA_HOME% environment variable.
- Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required run a command prompt and type ant. If program cannot be found then add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable. Set-up New Project
Open Command Prompt, navigate to bin directory within the android sub-folder of the Cordova distribution.
Type in: ./create
Then press Enter.Launch Eclipse. In File Menu Item and select to Import…
Import Select “Existing Android Code into Workspace” and click ‘Next >’.
Browse the project created through command prompt. And click ‘Finish’. Deploy to Emulator From within Eclipse, press this toolbar icon.
Once open, the Android SDK Manager displays various runtime libraries Install the APIs as per requirement from here. From within Eclipse, press this toolbar icon.
Choose and device definition from the list which comes. (There is only one item in the current list.) Press New… in the above window to create new Android Virtual Device(AVD) and use it to run your project.
To open the emulator as a separate application, Select the AVD and press Start. It launches much as it would on device, with additional controls available for hardware buttons:
Deploy to Device:
Make sure USB debugging is enabled on your device and plug it into your system. Right Click the Project and go to Run As > Android Application.
I was having issues wtih installing phonegap. The issues were fixed when i run cmd as Administrator and then run command
npm install -g phonegap
and it is installed successfully.
Then in the directory where it is installed i opened cmd, and run command phonegap and it was working fine. Now going to play with it more :)
Thanks buddies for all this help.
In C:\phonegap-2.9.0\lib\windows-phone-8 there's
a batch file called createTemplates.bat
. You need to execute this file, which will create the CordovaWP8_2_9_0.zip
file mentioned in their docs.
I had same issue but finally i got success by doing this please go throw this image Plase Run all the command in the PHONE TOOL COMMAND PROMPT
I have found this Multi-Device Hybrid Apps for Visual Studio Documentation for CTP1.1 Last updated: May 29, 2014 .
Some of the content from the documentation as follows.
This release supports building apps for the following device targets:
Android 4+ (4.4 providing the optimal developer experience) iOS 6 & 7 Windows 8.0 (Store) Windows Phone 8.0
Requirements: Windows 8.1
Visual Studio 2013 Update 2 - Professional, Ultimate, or Premium with the following optional features installed:
Tools for Maintaining Store apps for Windows 8 Windows Phone 8.0 SDK
Additional system requirements vary by device platform:
The Android emulator works best with PCs capable of installing the Intel HAXM driver
Windows Phone 8 requires a Hyper-V capable PC to run the emulator Building for iOS and using the iOS Simulator requires a Mac capable of running Xcode 5.1
Third Party Dependencies :
Joyent Node.js – Enables Visual Studio to integrate with the Apache Cordova Command Line Interface (CLI) and Apache Ripple™ Emulator Git CLI – Required only if you need to manually add git URIs for plugins
Google Chrome – Required to run the Apache Ripple emulator for iOS and Android
Apache Ant 1.8.0+ – Required as a dependency for the Android build process
Oracle Java JDK 7 – Required as a dependency for the Android build process
Android SDK – Required as a dependency for the Android build process and Ripple
SQLLite for Windows Runtime – required to add SQL connectivity to Windows apps (for the WebSQL Polyfill plugin)
Apple iTunes – Required for deploying an app to an iOS device connected to your Windows PC
Running the CMD as Administrator on Windows got me going and I think it only makes perfect sense because people don't really ever make an effort to install their stuff in a custom directory. So when you install node.js in Windows directory and then try to install PhoneGap on a Unelevated CMD it has a hard time setting the path variables.
I had the same problem. I lost hours, then I saw that version of node.js installed was 0.8. But I downloaded and installed version 0.10 from node.js website.
I downloaded and installed again, and now version is 0.10. Result: PhoneGap has been sucessfully installed with this version.
Phonegap은 신입생에게는 약간 까다로울 수 있습니다. 나는 전화의 기본 기능에 액세스 할 수있는 강력한 안드로이드 응용 프로그램을 만드는 최적의 방법을 찾으려고 많은 시간을 보냈습니다.
이 링크 는 창, HTML 및 자바 스크립트를 사용하여 Phonegap Android 애플리케이션을 작성하는 현명한 방법을 제공합니다.
나도 phonegap 단계로 많은 어려움을 겪었다.
올바른 문서는 다음 링크에 있습니다. http://docs.phonegap.com/en/edge/guide_cli_index.md.html
더 이상 cordova 명령이 없으며 phonegap으로 바뀝니다.
참고 URL : https://stackoverflow.com/questions/18035566/phonegap-cordova-installation-windows
'Programing' 카테고리의 다른 글
기존 정보를 보존하면서 다른 유형과 메시지로 예외를 다시 발생시킵니다. (0) | 2020.07.14 |
---|---|
C ++에서 포인터에 대한 참조 전달 (0) | 2020.07.14 |
구조체가 상속을 지원하지 않는 이유는 무엇입니까? (0) | 2020.07.14 |
.NET에서 특정 앱의 여러 인스턴스를 방지합니까? (0) | 2020.07.14 |
파라미터로 메소드를 문서화하는 방법은 무엇입니까? (0) | 2020.07.14 |