I'm using robotium to make a small test for an app and I receive the next error when running "./gradlew androidTest" :Task 'androidTest' not found in project ':APPName'.
I have the next structure: --src ---main ----androidTest -----java ------test.java (eg)
My gradle file contains:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
}
signingConfigs {
debug {
}
release {
}
}
buildTypes {
release {
}
}
lintOptions {
abortOnError false
}
}
dependencies {
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.0.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
The androidTest folder must be a child of src.
- project
-- src
--- androidTest
--- main
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.