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.
My highlighters to the problem above are:
To open a Cordova for Android project in Android Studio:
Launch Android Studio.
Select Import Project (Eclipse ADT, Gradle, etc).
Select the Android platform directory in your project (/platforms/android).
For the Gradle Sync question you can simply answer Yes.
Once it finishes importing, you should be able to build and run the app directly from Android Studio. See Android Studio Overview and Building and Running from Android Studio for more details.
Refs:
https://cordova.apache.org/docs/en/latest/guide/platforms/android/
https://www.codeproject.com/articles/1068176/step-by-step-guide-to-build-ionic-hybrid-app-using
For the theory behind the bove logic and possible bunders you may make, please see my answer to the following question:
Building Ionic framework in android studio
You dont have to import the Android Gradle. You have to previously do a
ionic platform add android
ionic build android
and then import your platforms/android
folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With