簡體   English   中英

在android studio中創建新項目時出現junit錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM