Coder Social home page Coder Social logo

hello-scaloid-sbt's Introduction

Hello Scaloid for sbt

This is a template project that can be a starting point of a new Scaloid project.

This contains minimum code as possible; therefore easy to run, examine and extend.

Prerequisites

  • sbt 0.13.5 or above
  • JDK 1.7 or above
  • Android build tools 20.0.0 or above
  • Android SDK Level 16
  • Level 16 is required for building, while this app retains runtime compatibility from API Level 10. Please refer to minSdkVersion property in AndroidManifest.xml

Build

You can build this project using sbt:

$ sbt android:package

This will compile the project and generate an APK.

Run

$ sbt android:run

For more command, refer to android-sdk-plugin for sbt.

Tips for faster development iteration

In sbt, ~ is a prefix that repeatedly runs the command when the source code is modified.

~run

This sbt command schedules to execute compile-package-deploy-run process after you save the edited source code. Compiling and packaging runs incrementally, so this iteration takes about only few seconds.

If you use default AVD, try genymotion or other faster virtual device. Deploying apk to the device becomes much faster!

Using IntelliJ IDEA

We recommend to use IntelliJ, not Android Studio nor Eclipse.

Generate the local.properties file

 $ android update project -p . # in the root of the project

Plugins

Make sure the Scala & SBT plugins are installed in IntelliJ IDEA

Import the SBT project

File -> Import Project... -> select project root folder -> OK -> Import project from external model -> SBT Project -> Check "Use auto-import" & for Project SDK, select an Android API platform -> Finish. Choose to configure the android project when IDEA asks.

Edit the generated run configuration. Remove the 'Before launch: Make' then add a new SBT command android:package-debug then tab out or it will not save, then click OK then OK.

You now should be able to run and debug from the run configuration like normal.

Troubleshooting IntelliJ

Local path doesn't exist. when Intellij tries to deploy the apk.

File -> Project Structure -> Modules -> hello-scaloid-sbt -> Android -> Packaging -> Then choose the APK Path for the apk. For this project it should be in .../bin/hello-scaloid-sbt-debug.apk

Troubleshooting

Build error Android SDK build-tools not available

The most likely cause of this error is that your SDK build-tools are old. Update the Android SDK and retry.

Further Reading

hello-scaloid-sbt's People

Contributors

pocorall avatar blast-hardcheese avatar awwaiid avatar wookietreiber avatar mheider avatar realakhmed avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.