[英]junit error when creating a new project in android studio
當我在android studio上創建新項目時,我收到錯誤:
這是我點擊項目中的show時的代碼:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "org.ashiyane.sepehr"
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.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
}
只需在build.gradle文件中注釋該行。
//testCompile 'junit:junit:4.12'
檢查模塊依賴項:Android Studio>文件>項目結構>選擇模塊>依賴項> +>庫依賴項>檢查它是否可用,否則在SDK中更新存儲庫
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.