Unable to start the daemon process

Hi when i started building my android app project i found an error

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
Unrecognized VM option 'MaxPermSize=256m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

                    throw e;
Error code 1 for command: /var/www/html/ionicApp/platforms/android/gradlew with args: cdvBuildDebug,-b,/var/www/html/ionicApp/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /var/www/html/ionicApp/platforms/android/cordova/build: Command failed with exit code 1

what this error actually relating to when i google it i found its something related to android studio,but i am not on studio.I am confused as this is my first experience with handling java related task.

This is a JVM option which is not recognized by your java runtime.
What is the version of java you’ve installed?

What does it say when you run command below?

java -version
java -version
openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK Server VM (build 25.45-b02, mixed mode)

MaxPermSize option has been removed in JDK 8, I think that if you were using Oracle JDK this would be just a warning not an error as it is with openjdk. SO either install oracle jdk or find the file where the daemon is configured and delete this option.

1 Like

i am using


and yes it’s and error

Error: /var/www/html/ionicApp/platforms/android/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/home/university/.nvm/versions/node/v4.1.0/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

i am on ubuntu

java -version says open jdk 8 not oracle 9, so I guess that your $PATH is wrong.
And also jdk 9 is not yet released so it should not be used for Android build tools.
Your java setup needs some fixing.

I have the same problem
what can I do?
inbox me psoussoukpo@gmail.com

i have the same problem with you
do you have any solution?

inbox me arvinjanathanadhim@gmail.com

I am Also Have same problem while build APK With ionic …

Create file project.Properties
paste the below code ;
org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m

then copy the file .after paste the file in following DIR