0

Nearly since about 4 weeks i am struggleling with a strange error compiling my ionic app for android platform. It doesn't matter if its a fresh vcreated app or the project app i am currently working on.

After adding android platform successfully the build command always crashed leaving me the following stack:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.gradle.internal.SystemProperties
        at org.gradle.logging.internal.AbstractStyledTextOutput.println(AbstractStyledTextOutput.java:68)
        at org.gradle.BuildExceptionReporter.renderSingleBuildException(BuildExceptionReporter.java:102)
        at org.gradle.BuildExceptionReporter.execute(BuildExceptionReporter.java:71)
        at org.gradle.BuildExceptionReporter.execute(BuildExceptionReporter.java:41)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:47)
        ... 14 more

E:\Files\App Projekte\Siedler von Catan App\src\catan-mobile\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c ""E:\Files\App Projekte\Siedler von Catan App\src\catan-mobile\platforms\android\gradlew" cdvBuildDebug -b "E:\Files\App Projekte\Siedl
er von Catan App\src\catan-mobile\platforms\android\build.gradle" -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\nerondo\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

I realy could not figure out which part of the framework causing trouble here... i reinstalled all necessary modules which are.

  1. java 1.8.0_65
  2. android API 2.2
  3. ionic 1.7.8
  4. cordova 5.3.3
  5. android-cordova 4.4
  6. npm: 3.3.8

My OS is Windows 7 64x.

  • It seems that you have not set path properly so,that class org.gradle.internal.SystemProperties is not initialize, have you tried this http://stackoverflow.com/a/28623585/4146722 – Pratik Tank Nov 07 '15 at 15:55
  • Try deleting the .gradle file from your directory, normally its `C:\Users\profile_name\.gradle and try building the project.` If that doesnot work. Try the following solution: 1. set an environment variable-->system variable(not user) variable name: JAVA_OPTIONS variable value: -Xmx512M If your paths are configured properly, this will do the trick. 2. try removing the platform and adding it again and then rebuild the solution. – Sunil Lama Nov 09 '15 at 09:02

0 Answers0