How do I setup the environment to work with Ionic and Cordova? Follow the to the official website does not work (gives error “Cordova is not available” when i use --livereload) … my clients are already furious, please help me!
Cordova is only accessible via cell. Are you referring to accessing plugins via desktop/laptop? If so, it’s not possible.
Im acessing via Emulator and Cell
print your ionic info for me to try to do the same, please
On a new computer, I installed:
- Java
- Ant
- Andrioid Studio
- NodeJs
- Ionic and Cordova (
npm install -g cordova ionic
)
And after everything configured just like the Ionic documents, I created a new basic app:
ionic start myApp tabs
The application even runs normally, but when I go to debug:
ionic cordova run android -lc
I get the following message:
console.warn: Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
console.warn: Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
Did I forget to do something?
I don’t have experience working with emulators aside from Android Studio. So in terms of Ionic and emulators, I have no input.
The warnings you received are par for the course when debugging in the browser though. You didn’t do anything wrong, and every other person that debugs Ionic in the browser receives the same warning.
If your client expects you to change that, they need to be willing to pay you a billion dollars, as you’d have performed a genuine miracle in the process.
cli packages: (C:\NVM\nvm-noinstall\v8.5.0\node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.1.7
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.5.0
npm : 5.3.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
put command cordova requirements
… please…
hey @marciusbezerra,
if you are using windows system then follow these instructions :-
-
Download and Install node.js from Here
-
After successfull installation run this command in cmd
node --version
, this gives you the version of your node.js installed in your system -
After that run these command in
cmd
(cmd run as administrator)npm install -g cordova
npm install -g ionic
-
Download and install JDK from Here
-
Download and Install
android studio
from Here -
Open
computer properties -> Advance System Setting -> Environment Variables
-
In system variables Add New Variable
JAVA_HOME
and path of yourjava -> jdk -> bin
-
In system variables Add New Variable
ANDROID_HOME
and path of yourAndroid SDK
and finally from your ionic project, windows/lin/mac terminal run, ionic serve
in the android case, ionic cordova run android (assuming you have an android phone, plugged by usb, to the development workstation).