简体   繁体   English

CCA模拟Android错误

[英]CCA Emulate Android error

I'm making an android app in the Chrome API. 我正在Chrome API中制作一个android应用。 I got my emulator set up and everything seems to be working fine except CCA throws a weird error. 我已经设置好仿真器,除了CCA抛出一个奇怪的错误之外,其他一切似乎都工作正常。

C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld>cca emulate android
    cca v0.5.0
    Running command: "C:\Program Files\nodejs\node.exe" "C:\Users\Giovanni\Google  Drive\cde\dwm\DerpyWorld\hooks\before_prep are\cca-check.js" "C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld"
    Running command: cmd "/s /c ""C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld\platforms\android\cordova\run.bat" --emulator""
'C:\Users\Giovanni\Google' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld\platforms\android\cordova\node_modules\q\q.js:126
    throw e;
           ^                 
    Error code 1 for command: cmd with args: /s,/c,C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld\platforms\android\gradl
    ew,assembleX86Debug,-b,C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld\platforms\android\build.gradle,-Dorg.gradle.dae
    mon=true,-x,lint,-x,lintVitalX86Release,-x,lintVitalArmv7Release,-x,compileLint,-x,copyReleaseLint,-x,copyDebugLint
    Error: cmd: Command failed with exit code 8
        at ChildProcess.whenDone (C:\Users\Giovanni\AppData\Roaming\npm\node_modules\cca\node_modules\cordova\node_modules\c
    ordova-lib\src\cordova\superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

C:\Users\Giovanni\Google Drive\cde\dwm\DerpyWorld>

Any ideas? 有任何想法吗?


Oke, well I fixed the last issue by moving it into a folder with no spaces... a really bad fix imo. 好的,我通过将最后一个问题移到没有空格的文件夹中来解决了……这确实是个糟糕的imo。 Of course, issues continue. 当然,问题还在继续。

C:\\Users\\Giovanni\\android\\DerpyWorld>cca emulate android cca v0.5.0 Running command: "C:\\Program Files\\nodejs\\node.exe" C:\\Users\\Giovanni\\android\\DerpyWorld\\hooks\\before_prepare\\cca-check.js C:\\Users\\Giovanni\\android\\DerpyWorld Running command: C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\cordova\\run.bat --emulator C:\\ Users \\ Giovanni \\ android \\ DerpyWorld> cca模拟android cca v0.5.0运行命令:“ C:\\ Program Files \\ nodejs \\ node.exe” C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ hooks \\ before_prepare \\ cca -check.js C:\\ Users \\ Giovanni \\ android \\ DerpyWorld运行命令:C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platforms \\ android \\ cordova \\ run.bat --emulator

FAILURE: Build failed with an exception. 失败:构建失败,发生异常。

  • Where: Build file 'C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\build.gradle' line: 27 其中:构建文件“ C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platforms \\ android \\ build.gradle”行:27

  • What went wrong: A problem occurred evaluating root project 'android'. 出了什么问题:评估根项目“ android”时发生问题。

    Failed to apply plugin [id 'android'] Gradle version 1.10 is required. 无法应用插件[id'android'] Gradle版本1.10。 Current version is 2.2.1. 当前版本是2.2.1。 If using the gradle wrapper, try editing the distributionUrl in C:\\Users\\Giovanni\\android\\DerpyWorld\\gradle\\wrapper\\gradle-wrapper.properties to gradle-1.10-all.zip 如果使用gradle包装器,请尝试将C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ gradle \\ wrapper \\ gradle-wrapper.properties中的distributionUrl编辑为gradle-1.10-all.zip

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

BUILD FAILED 建立失败

Total time: 1.178 secs 总时间:1.178秒

C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\cordova\\node_modules\\q\\q.js:126 throw e; C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platforms \\ android \\ cordova \\ node_modules \\ q \\ q.js:126抛出e; ^ Error code 1 for command: cmd with args: /s,/c,C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\gradlew,assembleX86Debug,-b,C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\build.gradle,-Dorg.gradle.daemon=true,-x,lint,-x,lintVitalX86Release,-x,lintVitalArmv7 Release,-x,compileLint,-x,copyReleaseLint,-x,copyDebugLint Error: C:\\Users\\Giovanni\\android\\DerpyWorld\\platforms\\android\\cordova\\run.bat: Command failed with exit code 8 at ChildProcess.whenDone (C:\\Users\\Giovanni\\AppData\\Roaming\\npm\\node_modules\\cca\\node_modules\\cordova\\node_modules\\cordova-lib\\src\\cordova\\superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5) ^命令的错误代码1:带有args的cmd:/ s,/ c,C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platforms \\ android \\ gradlew,assembleX86Debug,-b,C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platform \\ android \\ build.gradle,-Dorg.gradle.daemon = true,-x,lint,-x,lintVitalX86Release,-x,lintVitalArmv7版本,-x,compileLint,-x,copyReleaseLint,-x,copyDebugLint错误:C :\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ platforms \\ android \\ cordova \\ run.bat:命令失败,退出代码为ChildProcess.whenDone(C:\\ Users \\ Giovanni \\ AppData \\ Roaming \\ npm \\ node_modules \\ cca \\ node_modules \\在Process.ChildProcess._handle的也许关闭(child_process.js:756:16)的ChildProcess.emit(events.js:98:17)的cordova \\ node_modules \\ cordova-lib \\ src \\ cordova \\ superspawn.js:135:23) .onexit(child_process.js:823:5)

C:\\Users\\Giovanni\\android\\DerpyWorld>C:\\Users\\Giovanni\\android\\DerpyWorld\\gradle\\wrapper\\gradle-wrapper.properties to gradle-1.10-all.zip C:\\ Users \\ Giovanni \\ android \\ DerpyWorld> C:\\ Users \\ Giovanni \\ android \\ DerpyWorld \\ gradle \\ wrapper \\ gradle-wrapper.properties到gradle-1.10-all.zip

The problem is with this line: 问题在于此行:

cmd "/s /c ""C:\\Users\\Giovanni\\Google Drive\\cde\\dwm\\DerpyWorld\\platforms\\android\\cordova\\run.bat" --emulator""

The path is not passed properly as a parameter, and the parse is not reading past the 路径未作为参数正确传递,并且解析未读取通过 in the path. 在路径上。

There is a setting somewhere in CCA that determines the value of this line, and it is incorrect. CCA中某处的设置确定此行的值,并且它是错误的。 You need to double-check your ""s in that string, as they are causing your error. 您需要仔细检查该字符串中的“”,因为它们会导致您的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM