【androidstudio】The SourceSet ‘instrumentTest‘ is not recognized by the Android Gradle Plugin

问题描述

The SourceSet ‘instrumentTest’ is not recognized by the Android Gradle Plugin. Perhaps you misspelled something?

AndroidStudio升级到4.0.1后编译报错:The SourceSet ‘instrumentTest’ is not recognized by the Android Gradle Plugin. 是因为
在这里插入图片描述
这里的配置中 instrumentTest 已被弃用,不适用于现在的 gradle 版本

解决办法

用 androidTest 替换 instrumentTest,编译运行即可。


版权声明:本文为Android_points原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。