【问题标题】:Visual Studio Cordova cannot build on androidVisual Studio Cordova 无法在 android 上构建
【发布时间】:2016-11-21 08:21:43
【问题描述】:

当我将代码构建到 android 设备时,输出时出现以下错误。

1>------ Clean started: Project: Shhh...ItWorks, Configuration: Debug Android ------
1>  ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
1>  JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
1>  Running: C:\app\TW Secret\11232015\Shhh...ItWorks_\Shhh...ItWorks\platforms\android\gradlew clean -b C:\app\TW Secret\11232015\Shhh...ItWorks_\Shhh...ItWorks\platforms\android\build.gradle -Dorg.gradle.daemon=true
1>
1>  FAILURE: Build failed with an exception.
1>
1>  * What went wrong:
1>  A problem occurred configuring root project 'android'.
1>  > Could not resolve all dependencies for configuration ':_debugCompile'.
1>     > Could not find any version that matches com.android.support:support-v13:23+.
1>       Searched in the following locations:
1>           https://repo1.maven.org/maven2/com/android/support/support-v13/maven-metadata.xml
1>           https://repo1.maven.org/maven2/com/android/support/support-v13/
1>       Required by:
1>           :android:unspecified
1>     > Could not find any version that matches com.google.android.gms:play-services-gcm:+.
1>       Searched in the following locations:
1>           https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/maven-metadata.xml
1>           https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/
1>       Required by:
1>           :android:unspecified
1>
1>  * Try:
1>  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>
1>  BUILD FAILED
1>
1>  Total time: 2.267 secs
1>  Picked up _JAVA_OPTIONS: -Xmx512M
1>
1>  C:\app\TW Secret\11232015\Shhh...ItWorks_\Shhh...ItWorks\platforms\android\cordova\node_modules\q\q.js:126
1>                      throw e;
1>                            ^
1>  Error code 1 for command: cmd with args: /s /c ""C:\app\TW Secret\11232015\Shhh...ItWorks_\Shhh...ItWorks\platforms\android\gradlew" clean -b "C:\app\TW Secret\11232015\Shhh...ItWorks_\Shhh...ItWorks\platforms\android\build.gradle" -Dorg.gradle.daemon=true"
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(354,5): error MSB3073: The command "platforms\android\cordova\clean.bat" exited with code 1.
========== Clean: 0 succeeded, 1 failed, 0 skipped ==========

当我尝试清理解决方案时,它显示此错误:

Severity    Code    Description Project File    Line
Error   MSB3073 The command "platforms\android\cordova\clean.bat" exited with code 1.   Shhh...ItWorks  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets   

我正在使用 Cordova 5.3.3 有谁知道如何解决这个问题?

【问题讨论】:

  • 嘿,一个简单的“空白”模板项目是否从 VS 成功部署到您的 android 设备?部署到 Ripple 怎么样?是不是只有设备坏了?你用的是什么版本的VS?

标签: visual-studio-cordova


【解决方案1】:

一一卸载重装插件后发现是推送插件与本地通知插件冲突,删除一个或另一个解决问题:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-25
    相关资源
    最近更新 更多