It is bit tricky to do this all together. Let me give me a overview why I choose these tools .
- IntelliJ IDEA is an IDE I love working on. Actually for all of my developing purpose I use Jetbrain’s Product. PhpStorm, PyCharm, WebStorm. Since, it is not targeted for native android development choosing Android Studio is not necessary. I use that for native as it. Currently, I am using latest version – v14.
- Phonegap is being used as I need to develop hybrid app. Android SDK is needed for deployment in android platform. I am using version 5.1.
- You may ask why Genymotion in lieu of AVD. The answer is, Genymotion seems faster to me. If you have already use AVD, it is not important how high end machine you use, I am sure you are very annoyed when you try to emulate. Genymotion may reduce your anger to some extent.
- Linux: seriously?? You are going to ask me why linux??
Downloads & Installations:
- To use phonegap make sure you have node.js and npm installed in you system. Then run following command.
$ sudo npm install -g phonegap
- Download android SDK. Extract it to the folder where you want to install it. Lets say it is the “home” folder. ~/android-sdk-linux Add ~/android-sdk-linux/tools and ~/android-sdk-linux/platform-tools to your path variable.
- Run $ andoird and download necessary libraries and API.
- Download genymotion and install it and install it buy running the .bin file.
- Download IntelliJ IDEA. Extract it to the folder where you want to install it. Lets say it is the “home” folder
- run $ bin/idea.sh (make sure it is executable) and follow the installation process.
- Install “Genymotion” and “Phonegap/Cordova” plugin. To install it, go to Settings → Plugins → Install JetBrains plugin…, then select PhoneGap/Cordova Plugin and click Install plugin. Same goes for genymotion.
- Create a new project using Web Static → Phonegap/Cordova category.
- after project creating the project open Project Structure (ctrl+shift+alt+s) in SDK add JDK library then Android SDK.
- On same window (Project Structure) select Modules. Click on (+) → import module. Select android folder under platform folder. and click next. Important note that, do not import debug folders. When folder selection screen comes, select all folders (eg: ../android and all ../gen and ../src folder) except debug folders.
- Open Run/Debug Configuration.Click (+) → Android Application. Select then module you imported earlier. In Target Device select “Show Chooser Dialog” option.
- Run Genymotion and start your device.
- Run this newly created android configuration instead of Phonegap run and you will see your app running on your genymotion device.
- No module in step 5 ?
– Make sure you have imported the module properly as described in step 4.
- Errors on importing module ?
– Follow the instruction carefully. May be you have added debug folders too.