The SourceSet 'commonTest' is not recognized by the Android Gradle Plugin. Perhaps you misspelled something?

廉价感情. 提交于 2019-12-04 03:31:03

问题


Seemingly the same root cause as this question, but the answer there will not work for me. I have a custom source set called commonTest that I use for sharing certain test utility code across the test and androidTest source sets. Here is my relevant project config:

sourceSets {
    // This lets us write test utility code that can be used by both unit tests and android tests
    commonTest {
        java
    }
    test {
        java.srcDirs += commonTest.java.srcDirs
    }
    androidTest {
        java.srcDirs += commonTest.java.srcDirs
    }
}

This worked fine with AGP 3.0.1, but breaks on AGP 3.1.0. Are custom source sets no longer supported?

来源:https://stackoverflow.com/questions/49601232/the-sourceset-commontest-is-not-recognized-by-the-android-gradle-plugin-perha

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!