Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there is any way to build hybrid app (Ionic, AngularJs, Cordova) in android studio

I am native android application developer working on java and android api's with android studio, recently i got a requirement to build a hybrid app with ionic, cordova and angularJs, i spent 5-6 hours and dig google to get some tutorail to setup a project structure of hybrid app in andorid studio, but haven't found anything.

I know how to use ionic, angular and cordova but don't know about the project structure and setup compiling and how to run.

so, i want you guys to post links of such tutorails (If you have any).

like image 403
Pankaj Arora Avatar asked Oct 06 '15 11:10

Pankaj Arora


Video Answer


1 Answers

Have a look over cordova CLI mode. In this see specific for Android Platform for that you first need following pre-requirement to use:

  1. Android Studio.
  2. Android SDK.
  3. Node.js
  4. Git Client

After installing Node.js Open it's terminal and follow command to create Cordova project with different platform. These steps are already mentioned in official documentation.

Once you have created executed cordova build androidcommand then browse to your project directory. In that you will find that there's a directory named platforms in that you will see Android, now open your Android Studio in that select Select Import Project (Eclipse ADT, Gradle, etc). when you create a new project from there browse to Android directory. That's all you need to do for cordova

Official documentation and referrals links:

http://ionicframework.com/docs/overview/#download

https://cordova.apache.org/docs/en/5.1.1/guide/platforms/android/index.html

https://cordova.apache.org/docs/en/5.1.1/guide/cli/index.html

https://docs.angularjs.org/misc/started

like image 184
Himanshu Agarwal Avatar answered Oct 16 '22 07:10

Himanshu Agarwal