Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This tutorial describes how to create and run PhoneGap, Apache Cordova and Ionic applications with IntelliJ IDEA.

Before you follow the tutorial, make sure you have PhoneGap/Cordova/Ionic CLI and corresponding platform tools such as XCode Tools and Android SDK installed on your machine.

1. Install the plugin

The support for PhoneGap, Apache Cordova and Ionic frameworks is available in IntelliJ IDEA, WebStorm and AppCode via the corresponding plugin. To install the plugin go to SettingsPluginsInstall JetBrains plugin…, then select PhoneGap/Cordova Plugin and click the Install plugin button.

After installing the plugin IntelliJ IDEA may ask you to restart the IDE. Please do so.

2. Configure the executable path

One more thing you'll need to accomplish before you'll be able to create and run PhoneGap/Cordova/Ionic applications is to configure the executable path for PhoneGap/Cordova/Ionic CLI via SettingsLanguages and FrameworksJavaScriptPhoneGap/Cordova.

3. Create new or open an existing application

To open an existing PhoneGap/Cordova/Ionic application, simply select the application folder via use the FileOpen menu. IntelliJ IDEA will detect the application and configure all the required project files automatically.

To create a new PhoneGap/Cordova/Ionic application, click FileNew Project…, then select Static Web, and then PhoneGap/Cordova App.

Once you've pressed the Finish button, the IDE will create a new application along with the project files:

4. Create a run configuration to run the application

To be able to deploy and run your application, you need a corresponding run configuration. To create one, go to RunRun Configurations… and use the Add button on the left to create a PhoneGap/Cordova run configuration. Here you may specify the working directory for running your application, the command (emulate, run or serve), the platform (Android or iOS), and the target (notice, you can't choose the target from the IDE when using PhoneGap CLI due to its limitations):

To run the application, use the Run button on the toolbar or via the Run menu:

In the Run tool window that appears when you run the application you'll find the logs:

If you use the emulate command, the IDE will launch the emulator automatically before deploying the application.

  • No labels