Visual Studio에서 Cordova 프로젝트를 작성할 수 없습니다
-
21-12-2019 - |
문제
Visual Studio 2013 및 Cordova CTP 1.1을 사용하고 있습니다. 프로젝트를 빌드하려고하면 다음과 같은 Cryptic 오류가 발생합니다 (가독성을 위해 줄 바꿈이 추가됨) :
Error 22
The command ""C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"
prepare --platform Android --configuration Debug
--projectDir . --projectName "servermon"" exited with code 8.
C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets 115 5 servermon
.
이 질문은 문제를 해결하는 것으로 보이지 않습니다. 내 시스템 경로가 모든 것과 관련이있는 것으로 보입니다.
C:\Program Files\Java\jdk1.7.0_60\bin
C:\Users\Nathan\AppData\Local\Android\android-sdk\tools
C:\Users\Nathan\AppData\Local\Android\android-sdk\platform-tools
C:\apache-ant-1.9.3\bin
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files (x86)\Windows Live\Shared
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files (x86)\nodejs\
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
.
편집 : 여기에 SDK 관리자의 스크린 샷이 있습니다.
1>------ Build started: Project: servermon, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(90,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> Your environment has been set up for using Node.js 0.10.26 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\al3uox1v.u2n\packages\vs-mda
1> ------ Build settings:
1> ------ buildCommand: prepare
1> ------ platform: Android
1> ------ cordovaPlatform: android
1> ------ configuration: Debug
1> ------ cordovaConfiguration: Debug
1> ------ projectName: servermon
1> ------ projectSourceDir: C:\Users\Nathan\Documents\CordovaTest\cordovatest\cordovatest
1> ------ App dir C:\Users\Nathan\Documents\CordovaTest\cordovatest\cordovatest\bld\Debug already exists
1> ------ Copying app files to www
1> ------ Done copying app files to www
1> ------ Copying res files
1> ------ Done copying res files
1> ------ Platform android already exists
1> ------ Certificate copy from C:\Users\Nathan\Documents\CordovaTest\cordovatest\cordovatest\res\cert\android to platforms\android
1> ------ Done copying certificate files to platforms\android
1>
1> C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126
1> throw e;
1> ^
1> CordovaError: The provided path "C:\Users\Nathan\Documents\CordovaTest\cordovatest\cordovatest\bld\Debug\platforms\android" is not an Android project.
1> at Object.android_parser (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\src\metadata\android_parser.js:37:15)
1> at C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\src\prepare.js:51:23
1> at Array.map (native)
1> at Object.prepare (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\src\prepare.js:49:35)
1> at preparePlatform (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\app.js:322:24)
1> at _fulfilled (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:787:54)
1> at self.promiseDispatch.done (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:816:30)
1> at Promise.promise.promiseDispatch (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:749:13)
1> at C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:557:44
1> at flush (C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:108:17)
1>C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets(115,5): error MSB3073: The command ""C:\Users\Nathan\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" prepare --platform Android --configuration Debug --projectDir . --projectName "servermon"" exited with code 8.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
. 해결책
Cordova가 다운로드 한 Android 템플릿이 "손상된"것 같습니다.
이 문제를 해결하려면 다음을 수행하십시오. 사용자 디렉토리에서 캐시 된 Android 플랫폼을 삭제 해보십시오.
C:\users\<username>\.cordova\android\*
.
그런 다음 Visual Studio에서 솔루션을 청소하고 빌드하십시오.또는 실제로 확신 할 수 있도록 프로젝트 폴더 내에서 'BLD'디렉토리를 삭제하십시오.
이것은 Cordova가 안드로이드 템플릿을 다시 다운로드하고 문제를 해결할 수있게합니다.
다른 팁
나에게는 bld
폴더를 삭제하고 모든 것이 맞습니다
Visual Studio Catch는 문제를 생성하고 캐시를 지우십시오.
-
도구, 옵션, Apache Cordova 용 도구를 선택한 다음 선택하십시오. Cordova 도구.
-
Clear Cordova 캐시를 선택하십시오.
-
프로젝트를 닫고 다시 열 수 있습니다.
-
빌드, 청소 솔루션을 선택하십시오.
제휴하지 않습니다 StackOverflow