Reputation:
I have created the project with cordova CLI but i do not know where i need to change and how to run the cordova android project with eclipse for each platform. Thanks for helping
Upvotes: 2
Views: 5137
Reputation: 7092
Before run the android project inside your Cordova Project you should know these things.
If you are making any changes in the Cordova Project then first you need to prepare the cordova. use the command cordova prepare
Then it changed in your config.xml
(for android) automatic as you added or any changes you made. Do not make any change in your android project which exist inside your Cordova project. You can only make change inside the www
folder of your Cordova project. And after made changed you need to make cordova prepare every time.
After prepare the cordova you can run the android project on device or emulator. For this you make sure you have made the path of android sdk for platforms-tools
and tools
in your environment system. If you not configure this path and add this two path in system environment .
Now run the android project on device use command cordova run android
and run on emulator use this command cordova emulate android
.
And if want to run on eclipse then you should import this android project of your workspace in eclipse. But if you again made changes in your cordova project then need to delete and again import the android project this switching happened every time so better to run through CLI.
I hope you got all things
Upvotes: 4
Reputation: 2182
Sunil's answer is good. I would like to add logging using Android Debug Bridge
(adb).
You may want to run:
adb logcat
on a seperate shell window for logs
after running cordova run android
you need when you run into errors
.This will produce huge
logs, so I would recommend using:
adb logcat|grep Cordova
Upvotes: 0