Skip to content
Donald Oakes edited this page Dec 14, 2014 · 31 revisions

Build Mythling from GitHub-hosted source, and run this local build on your device.

###Contents IDE Setup
Build and Run

###IDE Setup 1. You can use either [Eclipse](http://www.eclipse.org) with the Android [ADT Plugin](http://developer.android.com/sdk/installing/installing-adt.html) or [Android Studio](http://developer.android.com/tools/studio/index.html). - Mythling specifies a compilation target SDK of `android-19`, so to compile you'll need to install Android 4.4.2 (which can be done through the [Android SDK Manager](http://developer.android.com/tools/help/sdk-manager.html)).
  1. Get the source code.
    • Copy the Git repository URL for the desired Mythling branch into the clipboard:
      master branch: https://github.com/oakesville/mythling.git
    • Eclipse:
      • Open the Git Repositories view in Eclipse (Window > Show View > Other > Git > Git Repositories).
      • Right-click in Git Repositories view select "Paste Repository Path or URI". On the last page of the wizard, check the box that says "Import all existing projects after clone finishes".
    • Android Studio:
      • From the menu: VCS > Checkout from Version Control > GitHub.
###Build and Run 1. Build the project. - Eclipse: - To make things easy, we've committed the Eclipse .project and .classpath files. The settings in these files allow the mythling directory on the file system to be imported as as an Eclipse project. - If you've got Eclipse autobuild enabled, the project will have already been built; otherwise select Project > Build All from the menu or type ctrl-b. In case Eclipse complains about the res directory being missing, you may need to select Project > Clean before building. - Android Studio: - The dependencies are defined in build.gradle. - From the menu: Build > Make Project, or type ctrl-f9. Build output appears in the Gradle Console.
  1. Run in debug mode on your device.
    • Uninstall Mythling if you've installed it through the Play Store. Note: you'll lose your preference settings and they'll need to be re-entered.
    • Enable USB Debugging through the Android Settings app. This option is located under Developer Options.
    • Connect your device to a USB port on the PC where you're running Eclipse. (Some Samsung devices require their Kies PC software for USB connectivity. Other manufacturers may require their own specialized installations.)
    • Eclipse:
      • Right click on the mythling project in Package Explorer view and select Debug As > Android Application.
    • Android Studio:
      • From the menu: Run > Debug mythling, or type shift-f9.
    • Find and select your device under "Choose a running device".
      (If you don't have a device or want to test a different profile you can create an Android Virtual Device to run through the emulator). Click OK.
    • The IDE will install the Mythling APK on your device and you'll be able to step through the code and evaluate variables. A good place to start with a breakpoint is in MainActivity.refresh().
Clone this wiki locally