I recently decided to switch from Eclipse to Android Studio. While i was able to import my android project, i keep having problems setting up and transfering my unit tests. For testing purposes i made a directory in src folder (java folder and test package). For enabling robotium i followed another stack topic by adding androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1'
. Eventually i added my test java file from Eclipse. And when i try to run tests, i keep getting "Cannot resolve symbol Solo".
I have little understanding about how AS and gradle works, so probably i am missing something else. The contents of my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.colormindapps.work_rest__scheduler"
minSdkVersion 8
targetSdkVersion 21
testApplicationId "com.colormindapps.work_rest__scheduler.test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets {
main {
java.srcDirs = ['src/main/java', 'src/tests/java']
}
}
}
dependencies {
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1'
compile 'com.android.support:support-v4:19.0.+'
compile 'com.android.support:appcompat-v7:19.0.+'
}