Running application on real device or on Virtual Machine in Android Studio


#1

Hi,
I have built tabs application using: ionic start AppName tabs. Please find below ionic info command:

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.11.1
npm               : 6.0.0
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Kinga\AppData\Local\Android\sdk

Misc:

backend : pro

This application is empty for now and I want to build android platform using:

  1. ionic cordova platform add android - It’s OK
  2. ionic cordova build android - It’s error message:

Why can not I build it? Please, it’s important!
If more information needed let me know, I’ll do everything to fix it!

Important information:
When I tried to open project directly in Android Studio is working without issues:

But I still want to run my application on real device, please!

I have all requirements:
*Java JDK
*Android Studio
*Updated Android SDK tools, platform and component dependencies. Available through Android Studio’s SDK Manager

java -version
Picked up _JAVA_OPTIONS: -Xmx512M
java version “10.0.1” 2018-04-17
Java™ SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot™ 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)


#2

Cordova Error -> Requirements check for JDK failed

Have you set your JAVA_HOME environment variable?

my .bashrc:

export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"

See:


#3

yes, I have set JAVA_HOME environment variable:

image


#4

Is there someone who can advise, please?

java -version
Picked up _JAVA_OPTIONS: -Xmx512M
java version “10.0.1” 2018-04-17
Java™ SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot™ 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)