The first thing I want to tell you is that you don't need to develop with Android Studio to compile for Android, for example, we develop with Bracket or Visual Studio Code.
The correct steps to work with a PhoneGap project into an Android device are:
1.- phonegap create myapp com.mycompany.myapp MyApp
2.- cd myapp
3.- phonegap platform add android
4.- phonegap run andriod --device
If you want to work with your project in the Android emulator, you will have to modify the previous step 4 by this one:
4.- phonegap run android --emulator
If you want to work with the Chrome simulator in the test phase, you will have to modify the previous step 4 by this one:
4.- phonegap serve
I hope this helps you.
Thanks for your reply.
Our application consist of following components:
1. Android Native code + Java Jar
2. CordovaLib + Own created Cordova plugin
As I am a Android developer, I am using Android Studio to develop my project.
I have used the same commend set what you have mentioned above. Whenever we are using the command set , the keyword "phonegap" changed to "cordova" during the command execution. And we are getting depreciated warning from command prompt.
Now My main concern is whether this is the correct behavior of "Phonegap" or not.
Phonegap uses Cordova internally, so yes, that's the correct behaviour.
Which deprecate warnings are you getting?
To include native code, the best way is to develop a plugin and work with it. You do not need to publish it in npm in case that you compile in local, since you can add it by referring to the folder that contains it on your computer.
Both PhoneGap and Cordova can be run to compile. PhoneGap work Cordova in the background, so do not put that problem aside.
What version of PhoneGap do you have? You can see it typing in your terminal: phonegap -v
This is our version number:-
PhoneGap version: 6.5.0
Cordova android platform version: 6.1.2