https://developer.android.com/training/testing/unit-testing/local-unit-tests clearly states
...adding the following configuration in your project's top-level build.gradle file:
android {
...
testOptions {
unitTests.returnDefaultValues = true
}
}
But doing so results in an error:
Could not find method android() for arguments [...] on root project '...' of type org.gradle.api.Project.
Open File
When researching that error:
I find several existing StackOverflows that indicate it is wrong to add adroid{} to your top-level build.gradle file.
Could not find method android() for arguments in Android Studio project
In your top-level file, you can't define an android block.
Could not find method android() for arguments
In your top-level file you can't define an android block
Does that mean the Android documentation is wrong?
If not, please help me to understand.