当我在ubuntu上的
android studio 1.4中创建新项目时.
当毕业生的同步完成时,我收到此错误
testCompile 'junit:junit:4.12'
在app / build.gradle上显示消息
Error:(23,17) Failed to resolve: junit:junit:4.12 Show in File Show in Project Structure dialog
// build gradle(app module)
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsversion "23.0.1" defaultConfig { applicationId "com.example.abhishek.vearch" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs',include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:design:23.0.1' }
//建立毕业生(项目)
//顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项.
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。