【问题标题】:Ionic 2 running ionic cordova run android command issueIonic 2 运行 ionic cordova 运行 android 命令问题
【发布时间】:2018-02-16 23:19:14
【问题描述】:

当我运行命令 ionic cordova run android 以在设备上运行应用程序时出现以下错误...

> cordova run android
[11:19:06]  lint finished in 3.93 s 
ANDROID_HOME=/root/android-sdks
JAVA_HOME=/usr/lib/jvm/java-8-oracle

FAILURE: Could not determine which tasks to execute.

* What went wrong:
Task 'wrapper' not found in root project 'android'.

* Try:
Run gradle tasks to get a list of available tasks.

BUILD FAILED

Total time: 1.93 secs
Error: /usr/share/gradle/bin/gradle: Command failed with exit code 1

[ERROR] An error occurred while running cordova run android (exit code 1).

请帮我解决这个问题。提前谢谢你。

下面是 info 的输出:

离子信息

cli 包:(/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

全局包:

Cordova CLI : 7.0.1 

本地包:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.0

系统:

Node : v8.4.0
npm  : 5.3.0 
OS   : Linux 3.13

【问题讨论】:

  • 你能把ionic info的输出加进去吗?
  • 感谢 Valentin 的回复。我现在已将离子信息详细信息添加到问题本身中。请检查这些,让我知道我需要进一步做些什么。
  • 我假设您尝试删除 Android 平台然后重新添加?

标签: cordova ionic-framework ionic3 android-sdk-tools


【解决方案1】:

您应该尝试在与以前相同的文件夹中安装最新的 gradle 版本。你可以找到它here

【讨论】:

  • 我有 Gradle 4.1 版本,这是最新版本。
【解决方案2】:

通过安装打字脚本\n“npm install -g tsd”解决了这个问题。 在同一节点 8.4.0 版本上创建新项目 ionic cordova run android 对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-12-09
    • 2018-03-15
    • 1970-01-01
    • 2019-11-23
    • 1970-01-01
    • 1970-01-01
    • 2015-06-26
    • 1970-01-01
    相关资源
    最近更新 更多