Android Gradle插件报错:The SourceSet 'instrumentTest' is not recognized
程序员文章站
2022-05-26 20:42:26
...
升级到Android Studio 3.1,重新构建项目时报错,主要错误为:
The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin. Perhaps you misspelled something?
instrumentTest已被废弃,新的Gradle插件已经不支持。instrumentTest需要修改为androidTest。
即
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
androidTest.setRoot('tests')
}
上一篇: Javascript跨域
下一篇: PuTTY用户手册(十)
推荐阅读
-
Android The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
-
AS升级3.1 编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
-
原 AS升级3.1 编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
-
The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin. P
-
The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
-
AS升级3.3 编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
-
Android Gradle插件报错:The SourceSet 'instrumentTest' is not recognized