java – 错误(23,17)无法解析junit:junit:4.12 @Android Studi
发布时间:2020-12-14 05:39:17 所属栏目:Java 来源:网络整理
导读:目前使用 Android studio v.2.0 第一次申请时打开.它显示错误 (23,17)无法解决junit:junit:4.12 我已经安装了Android Support Repository,支持存储库 我的Gradle代码在picture.Android Studio V.2.0中 解决方法 您应该在build.gradle中添加它(因为junit是
目前使用
Android studio v.2.0
第一次申请时打开.它显示错误 (23,17)无法解决junit:junit:4.12 我已经安装了Android Support Repository,支持存储库 我的Gradle代码在picture.Android Studio V.2.0中 解决方法
您应该在build.gradle中添加它(因为junit是从maven存储库中提取的):
repositories { maven { url 'http://repo1.maven.org/maven2' } jcenter { url "http://jcenter.bintray.com/" } } dependencies { compile fileTree(include: ['*.jar'],dir: 'libs') testCompile 'junit:junit:4.12' .... } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |