Running app on Android Device


#1

Hi,
I try to start my app using command:
ionic cordova run android --device

It’s a Taxi application and has login with Facebook option which I’m not able to use when I try to use command: ionic serve or ionic lab

I already have Java JDK, Android Studio and updated Android SDK tools.

I have also enable USB debugging and Developer Mode on Android device. When I try to use this command this error occurs:

00:24:47] lint finished in 2.88 s
Starting a Gradle Daemon (subsequent builds will be faster)

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 https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

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

*** Get more help at https://help.gradle.org**
(node:13604) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
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 https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

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

*** Get more help at https://help.gradle.org**
(node:13604) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[OK] Your app has been deployed.
** Did you know you can live-reload changes from your app with --livereload?**

What is wrong if I did everything from Ionic Academy tutorial: https://www.youtube.com/watch?v=Fw46diR8rAs