LDSTechForumProjects

LDS Mobile Android - How to Build Projects

Please follow these steps in order, or the project will not build correctly in Intellij.

Setup Environment

You MUST complete this for the project to build

LDS Mobile Android - Developer Setup

Get the code

  • Open Terminal/Command Prompt and type
git clone <url to project repository>
All pictures reference Gospel Library

Build project with Maven

  • In the Terminal run the following commands
cd <project directory>
mvn clean install
  • This will take some time depending on your computer and your internet connection
  • All of the dependencies will be downloaded during this step.
Mvn.png
  • You should now see a screen like this.
Build success.png

Open Project in Intellij

  • Open Intellij
  • Click File -> Open Project
  • Navigate to the project and select the "pom.xml"
  • Click OK
OpenPom.png

Configure SDKs

  • Click File -> Project Structure...
  • Select "SDKs" from the left column
  • Verify Java 1.6 is in the middle column
  • If it is not click the add button and select "JSDK"
  • Select the location of your Java6 JDK
JavaSDK.png
  • Next verify that at least Android 4.0 shows in the middle column
  • If it is not click the add button and select "Android SDK"
  • Select the location of your "android-sdk" folder
AndroidSDK.png

Configure Project SDK

  • In the Project Structure Dialog
  • Select "Project" from the left column
  • Verify the "Project SDK" is Android 4.0 or greater
  • If it is not, select "Android 4.0 platform" or greater from the drop down.
  • Click Apply
ProjectSDK.png

Configure Modules SDK

  • In the Project Structure Dialog
  • Select "Modules" from the left column
  • Select "--apklib-com.actionbarsherlock_actionbarsherlock_4.2.0" from the middle column
  • Verify the "Module SDK" is Android 4.0 or greater
  • If it is not, select "Android 4.0 platform" or greater from the drop down.
  • Click Apply
ABSModuleSDK.png

Other Issues

Sometimes when compiling a project that uses ActionBarSherlock it can't find the imports.

  • Open a class that can't find an import like ActionBar.java.
  • Place cursor on the import error class name like FragmentTransaction.
  • Press Alt(Option on Mac) + Enter to bring up the fix suggestion dialog.
  • Select 'Add Library Maven:com.google.android:support-v4:r10 to classpath'.
  • In the menu select Build -> Rebuild Project.
ResolveABSError.png
This page was last modified on 11 August 2014, at 19:29.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.