Import a Cordova ionic project into Android studio?

Viewed 14041

I'm trying to import an Cordova Ionic project in Android Studio to modify some things and try to solve some bugs but I can't.

I never work with Ionic before and I tried to follow some tutorials about how to import Ionic into Android but no one works for me.

In all of them you have to go to Android Studio > Import Project (Eclipse ADT, Gradle, etc.) and then select a folder called platform and then the Android Gradle.

But the thing is that in my project I only have this folders: hooks, css, www.

3 Answers

- In Android Studio

  • Choose File->Settings
  • Navigate to Plugins Tab
  • Choose Install JetBrains Plugins
  • Search for Phonegap/Cordova Plugin
  • Click On Install the Plugin
  • And Restart Android Studio

- Open IONIC Project in any editor

Run this Command

  • ionic cordova prepare android
  • It will Prepares the Ionic Project for Android

Then run this command -

  • ionic cordova build android
  • It will Builds the Ionic Project for Android.

3.Open Android Studio

Choose File > New Project > Import Project > Choose the android folder of cordova directory > ok

  1. Run the project with Android studio.
Related