-1

使用 ionic 安装人行横道后,当我尝试构建 android 时出现此 gradle 错误:

在此处输入图像描述

没有找到任何解决方案,如果我创建一个没有人行横道的离子项目,则构建工作完美。

ionic info这里:

操作系统:Windows 8.1

节点版本:v0.12.0

科尔多瓦 CLI:4.2.0

离子版本:1.0.0-beta.14

离子 CLI 版本:1.3.11

有什么帮助吗?提前致谢

编辑:由我尝试使用android update projectand的用户建议ant clean,使用最后一个命令我得到构建失败错误:

PS C:\Users\aluknot\Desktop\Hybrid App\test\platforms\android> ant clean
Buildfile: C:\Users\aluknot\Desktop\Hybrid App\test\platforms\android\build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk

-setup:
     [echo] Project Name: MainActivity
  [gettype] Project Type: Application

-pre-clean:

clean:
[getlibpath] Library dependencies:
[getlibpath]
[getlibpath] ------------------
[getlibpath] Ordered libraries:
Duplicated project name in import. Project android_rules defined first in C:\Program Files (x86)\Android\android-sdk\too
ls\ant\build.xml and again in C:\adt-bundle\sdk\tools\ant\build.xml
Trying to override old definition of task testedprojectclasspath
Trying to override old definition of task getuitarget
Trying to override old definition of task getlibpath
Trying to override old definition of task renderscript
Trying to override old definition of task lint
Trying to override old definition of task dex
Trying to override old definition of task getprojectpaths
Trying to override old definition of task buildconfig
Trying to override old definition of task aidl
Trying to override old definition of task propertybyreplace
Trying to override old definition of task signapk
Trying to override old definition of task gettype
Trying to override old definition of task if
Trying to override old definition of task dependency
Trying to override old definition of task xpath
Trying to override old definition of task zipalign
Trying to override old definition of task apkbuilder
Trying to override old definition of task getbuildtools
Trying to override old definition of task aapt
Trying to override old definition of task getemmafilter
Trying to override old definition of task checkenv
Trying to override old definition of task mergemanifest
Trying to override old definition of task gettarget
Trying to override old definition of task emmajava
Trying to override old definition of task emma

nodeps:

-check-env:

-setup:
     [echo] Project Name: XWalkCoreLibrary
  [gettype] Project Type: Android Library

-pre-clean:

clean:

BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:470: Invalid file: C:\Users\aluknot\Desktop\Hybrid App\test\platforms\android\CordovaLib\build.xml

Total time: 1 second
4

1 回答 1

1

转储本身并不清楚,因为这可能是由于多种原因而发生的。您可以做的事情很少:

通过运行检查您的环境变量 ANDROID_HOME 的路径是否设置正确

echo $ANDROID_HOME

进入 build.xml 所在目录并运行命令

android update project

清理蚂蚁目录

ant clean

[注意:如果您在错误的文件夹中运行节点命令,可能会发生这种情况]

于 2015-03-02T18:37:11.470 回答