This repository was archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
Building Android Test Projects
glenviewjeff edited this page Nov 25, 2011
·
17 revisions
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
To avoid a circular dependency error like this, follow the below instructions:
sbt tests/android:package-debug
[info] Updating {file:/D:/Workspace/my-project/}tests...
[error] a module is not authorized to depend on itself: my-project#my-project_2.9.0-1;0.1
Thanks to this thread, I learned that you can just change the name of the test project like this:
settings = General.settings ++ AndroidTest.androidSettings ++ Seq(
name := "MyScalaProjectTest",
libraryDependencies += "com.jayway.android.robotium" % "robotium-solo" % "2.4", // If you're using Robotium
libraryDependencies += "junit" % "junit" % "3.8.2",
...
) dependsOn main```
- Getting started
- Scala versions
- Android Manifest generation
- Typed resources references
- ProGuard
- DDMS integration
- Building Java Android projects
- Building NDK projects
- Consuming Android Library projects
- Github integration
- Building Android Test Projects
- Password Manager
- Releasing to the Android Market
- Projects using sbt-android-plugin
- Contributors