Issue
I was trying Kotlin Gradle Script and Android Testing.
When I try to configure android resource for Testing I get the following error :
Cannot access includeAndroidResource It is private in UnitTestOptions.
What is the proper way to enable using android Resource in Android Unit testing?
Solution
After posting this question, I went back to Android Studio and tried to see what's there for autocomplete. I pressed Control+Space
just after testOptions.unitTests.
and boom, there was the option called isIncludeAndroidResources
which was kotlin getter in TestOptions class for
private includeAndroidResource
which I then set to true
.
Solution :
testOptions.unitTests.isIncludeAndroidResources = true
Lesson: Try to write a question to explain the problem, sometimes answer is inside your own head.
Answered By - erluxman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.