User:Johanmynhardt/IntelliJ Android SDK

= Getting up to speed on IntelliJ =

Setting up Android SDK on IntelliJ
These steps assumes that the Android SDK is already set up.


 * File -> Project Structure (Ctrl+Shift+Alt-S)
 * Select Project in the left-hand pane
 * Click on New
 * Select Android SDK from the list appearing
 * Browse to the directory where you installed the SDK and select it
 * eg.:
 * You'll be prompted to select a Java SDK
 * Then select the target Android Platform
 * Press OK, and you're done :)

Import OpenLP Android into IntelliJ

 * Click on "Create New Project" on the dashboard
 * Select "Create project from existing sources"
 * Next
 * Skip to the 2nd text edit, and browse to the project folder, using the "…" button
 * Select the project folder:
 * say you have the project folder as "openlp-android-mybranch" in "~/workspace"
 * you will select the folder "/home/user/workspace/openlp-android-mybranch"
 * Next
 * Next
 * Next
 * Next
 * Select the Android SDK you created in the previous section
 * Next
 * Finish
 * Click "Yes" on the popup asking whether you want to create a run configuration

You can find the Entry Activity by pressing Ctrl+Shift-N and typing OpenLP.java and pressing TAB.

Run Configuration
(To run project in an Emulator/USB device)


 * Edit Run configuration to add AVD if it does not exist:
 * From the menu: Run, Edit Configurations
 * If you have no default configuration, add a new one by pressing the add button, the "+"
 * Select "Android Application"
 * Give it a name,
 * Select the module in the "General" tab
 * if not selected, select "Launch default Activity"
 * Select Emulator from the Target Device section
 * if you don't have an AVD (Android Virtual Device) set up, create a new one by pressing the "…" button
 * the Android SDK's AVD manager will pop up.
 * Create your AVD
 * Select the created/existing AVD
 * Ensure that "Make" is checked
 * Press OK
 * Run your project from the menu, "Run" -> "Run"

Give it a while to fire up the emulator and install the app to it.