Reputation: 5540
I'm following this http://robolectric.org/getting-started/
but I'm getting: Error:(61, 0) Could not set unknown property 'includeAndroidResources' for object of type com.android.build.gradle.internal.dsl.TestOptions$UnitTestOptions.
when I add
android {
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
Upvotes: 12
Views: 5789
Reputation: 1425
Including this:
android {
testOptions.unitTests.isIncludeAndroidResources = true
}
worked for me.
Upvotes: 1
Reputation: 79
Try this code
testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
Upvotes: 6
Reputation: 49
starting with Robolectric 3.3 you’ll need Android Studio 3.0 alpha 5.
I guess you're using an older version of Android Studio.
Upvotes: 4