不支持的gradle方法instrumentTestCompile

 saanenkim 发布于 2022-12-12 20:57

gradle.build根据Google的说明,我在Android工作室的Android项目中包含espresso时,我有一个不受支持的gradle方法instrumentTestCompile :
https://code.google.com/p/android-test-kit/wiki/Espresso#Espresso_Setup_Instructions.

gradle.build:

dependencies {
  instrumentTestCompile files('libs/espresso-1.1.jar',
          'libs/testrunner-1.1.jar',
          'libs/testrunner-runtime-1.1.jar')

  instrumentTestCompile 'com.google.guava:guava:14.0.1',
          'com.squareup.dagger:dagger:1.1.0',
          'org.hamcrest:hamcrest-core:1.1',
          'org.hamcrest:hamcrest-integration:1.1',
          'org.hamcrest:hamcrest-library:1.1'
}

完成错误:

Build script error, unsupported Gradle DSL method found: ‘instrumentTestCompile()’!
Possible causes could be:
– you are using Gradle version where the method is absent
– you didn’t apply Gradle plugin which provides the method
– or there is a mistake in a build script

L. G... 5

我在这里找到了回复:http:
//android.amberfog.com/?p = 894

instrumentTestCompile()androidTestCompile()在最新版本的gradle插件中重命名为.

1 个回答
  • 我在这里找到了回复:http:
    //android.amberfog.com/?p = 894

    instrumentTestCompile()androidTestCompile()在最新版本的gradle插件中重命名为.

    2022-12-12 21:00 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有