Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Building Android Test Projects

glenviewjeff edited this page Nov 25, 2011 · 17 revisions

Building Android Test Projects

Under construction (please feel free to fix this up)

Put your Android test code in {project dir}/tests/src/main/(scala, java, AndroidManifest.xml, assets, res, etc.) To build the tests, use sbt tests/android:package-debug

Edit your project/build.scala to add the following missing lines as needed:

...
 settings = General.settings ++ AndroidTest.androidSettings ++ Seq(
      name := "MyScalaProjectTest", // You need to name your test project differently to avoid a circular dependency error
      libraryDependencies += "com.jayway.android.robotium" % "robotium-solo" % "2.4", // If you're using Robotium
      libraryDependencies += "junit" % "junit" % "3.8.2", // If you're using Junit
      ...
  ) dependsOn main
Clone this wiki locally