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

Before you begin, make sure you that have PhoneGap/Cordova/Ionic CLI and corresponding platform tools such as XCode Tools and Android SDK.

1. Enable frameworks support

PhoneGap, Apache Cordova and Ionic frameworks support is available in IntelliJ IDEA, WebStorm and AppCode via this plugin. To install it, go to

{span:class=shortcut}Install JetBrains plugin…{span}
, then select
{span:class=shortcut}PhoneGap/Cordova Plugin{span}
and click
{span:class=shortcut}Install plugin{span}

IntelliJ IDEA needs to be restarted to complete the plugin installation

2. Configure the executable path

The next step is to configure the executable path for PhoneGap/Cordova/Ionic CLI via

{span:class=shortcut}Languages and Frameworks{span}

3. Create or open an application

To open an existing PhoneGap/Cordova/Ionic application, simply select its folder via 

menu. Your IDE will detect the application and perform all required configuration steps automatically.

Creating a new application takes just a tad longer: click

{span:class=shortcut}New Project…{span}
, then select
{span:class=shortcut}Static Web{span}
, and then
{span:class=shortcut}PhoneGap/Cordova App{span}


, and the IDE will create a new application and all the files it requires:

4. Run your application

To deploy and run your application, you need to create a so called Run Configuration. For that, go to 

{span:class=shortcut}Run Configurations…{span}
and use the
button on the left to create a
run configuration.

Notice that it's created with default path and other settings, but you can,of course, change any of them as you need.

You can't select a target device from the IDE when using PhoneGap CLI due the existing limitations.

After the configuration is saved, use it to run your application via 

button on the toolbar or via the

In the

tool window that appears after the application is started you can find the output and logs:

If you're using the

command, an emulator will be automatically launched before application deployment.