Prerequisites
Developing with the Scala on Android toolchain is a considerably resource intensive undertaking. Depending on your editor and whether you keep emulators running during development or not, the memory consumption does vary greatly. You should be equipped with at least 4GB of RAM to cover the common use cases that are demonstrated in this documentation. Since compiling Scala code is known to be a tedious process, a fast CPU might improve this for you.
Java Development Kit (JDK)
Android supports Java 7, so the JDK 7 should also be your choice for now. If you already have a newer version of the JDK installed, this will work as well, but then you have to specify your compile target properly to version 1.7, which will be explained in the build tools topic.
Android Software Development Kit (Android SDK)
The Android SDK is a comprehensive tooling suite. It comes with applications that compile Java to Android bytecode, debugging and profiling applications, the Android emulator and a whole lot more.
Download and install the SDK. Then open your terminal and run android sdk
. The Android SDK Manager window will pop up and ask you to install Android version specific documentation, development APIs, sources and disk images for emulation. For a quick start it is sufficient to stick with the default selection.
Build Tool
Build tool integration plugins for Scala on Android are currently available for sbt, Gradle and Maven. The Scala Build Tool (sbt), is the Scala standard build tool and its configuration files are also written in Scala. The Android SDK Plugin for SBT is a very mature and well maintained plugin, furthermore most Scala IDEs integrate Scala nicely. Therefore sbt is the build tool of choice for this documentation.
A comparison of available build tools and detailed instructions for sbt is waiting for you in the next chapter.
Editor / IDE
You are more or less free to use any editor of your choice. With IDEs the integration process might cause a little trouble and depends on your build tool of choice. Please refer to the Editors and IDEs chapter for further information. The recommended tool is IntelliJ IDEA, which is also used as reference throughout the documentation.
Further reading
- Android SDK download
Official download page
- Installing the Stand-alone SDK Tools
Android SDK install instructions
- Android Tools
Description of all tools that are bundled with an Android installation
- IntelliJ IDEA
Official product page