-1

After install crosswalk with ionic i get this gradle error when i try to build android:

enter image description here

Didn't found any solution about this, if i create a ionic proyect without crosswalk the build work perfect.

ionic info here:

OS: Windows 8.1

Node Version: v0.12.0

Cordova CLI: 4.2.0

Ionic Version: 1.0.0-beta.14

Ionic CLI Version: 1.3.11

Any help? Thanks in advance

EDIT: suggested by an user i tried with android update project and ant clean, with the last command i get a build fail error:

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
Community
  • 1
  • 1
aluknot
  • 504
  • 2
  • 7
  • 20

1 Answers1

1

The dump in itself is not clear because this could be happening due to multiple reasons. There are few things you can do:

Check whether path of your environment variables ANDROID_HOME is set correctly by running

echo $ANDROID_HOME

Go to the directory where build.xml resides and run command

android update project

Clean ant directory

ant clean

[Note: It could be happening if you ran node commands in wrong folders]

Sheba
  • 726
  • 7
  • 16
  • You mean in my case `C:\Program Files (x86)\Android\android-sdk\tools\ant`? in the folder are 3 files only... `build.xml`, `NOTICE`, `uibuild.xml`. And i get an error saying: **The parameter --path must be defined for action 'update project'** I don't have a gradle folder inside platform/android in the ionic project, than in my work, i have a ionic project running without problems and with crosswalk... and a folder gradle inside a .jar and a .xml. – aluknot Mar 03 '15 at 02:34
  • From **platforms/** folder in your phonegap project folder, run `android update project --path android` and then `cd android/` and run `ant clean` – Sheba Mar 03 '15 at 05:56
  • This will work if your ANDROID_HOME is set correctly. – Sheba Mar 03 '15 at 05:56
  • Thanks, i tried but i get this error at the end of `ant 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** I updated the first post with all the output – aluknot Mar 03 '15 at 23:04