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.
- java 1.8.0_65
- android API 2.2
- ionic 1.7.8
- cordova 5.3.3
- android-cordova 4.4
- npm: 3.3.8
My OS is Windows 7 64x.