Skip to content
aguestuser edited this page Mar 11, 2015 · 1 revision

Getting started with Scaloid

TOC

### Scaloid

It seems like the best platform to build object-functional programs on Android is Scaloid. Here are some reference materials about Scaloid:

### IDE & Build tool

At the moment, it's sort of a toss-up between:

  1. Android Studio as the IDE with Gradle as the build tool
  • pros:
    • this is by far the most common platform for Android developers. Googling our problems will be easier.
    • it just got revamped and is extremely well documented by Google
    • Android Studio is built on top of InteliJ, so we can still get most of the cool features we would have gotten from it, plus possibly more cool features (ie: tightly integrate running and testing on emulators or devices) that might not be available on vanilla InteliJ
  • cons:
    • it enforces use of gradle as the build tool, but sbt seems to be the most common build tool used on Scala projects
    • it seems intended for use with Java, not Scala
  1. InteliJ as the IDE with sbt as the build tool
    • pros:
      • allows use of sbt, which seems like the more common build tool for Scala developers
      • might have more robust features for supporting Scala development
    • cons:
      • is (perhaps?)not as widely in use by Android developers
      • is not officially supported or documented by Google (unlike Android Studio)
      • using sbt might put us at odds with other Googlable examples of what we're trying to do

Some resources to help make the decision:

### Android Tooling

This can be a pain, and I have still not succeeded at getting an emulator up and running. Below are the steps I took to get the design environment set up. Your mileage may vary.

A couple decent walkthroughs of setting up the design environment:

JDK

Android Suite

  • download from ___ and follow instructions
  • will automatically install Android SDK and launch Android SDK Manager

Android SDK

  • can be installed as stand-alone (i didn't do this)

    • brew version is out-of-date?
  • from Android Suite install:

    • default install location: ~/Library/Android/skd
  • after install, set path files in ~/.bashrc as follows:

    export ANDROID_HOME="/Users/aguest/Library/Android/sdk"
    export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    
  • launch Android SDK Manager

    • launched automatically after install?
    • from welcome dialogue, click "Configure"
    • or from CL: android sdk (after setting path)

AVD (Android Virtual Device)

  • config:

    • choose device, target OS, chipset, memory allocation
    • be sure to allocate enough memory in HAXM to run it!
  • launch

    • from CL: android avd
    • from Android Suite: ??

HAXM (Hardware Accelarated Execution Manager)

  • necessary to make yr emulator not run at snail's pace

  • default install doesn't seem to work

  • Default Install (doesn't work!):

    • is an option in Android SDK Manager
    • dmg located at: ~/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/
    • default RAM allocation is 1024, often not enough for emulators
    • to re-install nav to dmg, run package installer, reset memory
  • Manual Install

  • Checks:

    • that it exists: kextstat | grep intel -> look for status message showing that com.intel.kext.intelhaxm is loaded
    • to stop (doesn't work): sudo kextunload –b com.intel.kext.intelhaxm
    • to start (doesn't work): sudo kextload –b com.intel.kext.intelhaxm
    • to uninstall: sudo /System/Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh

Emulator