2016-10-02 29 views
2

運行我在Android Studio中的項目我所看到的,當我嘗試運行時,我發現一個問題,測試類是0在包中發現「繪製」錯誤Android Studio中

0 test classes found in package 'drawable' 

Process finished with exit code -1 
Empty test suite. 

雖然我已經尋找這個問題我找不到解決方案,我甚至試圖使緩存失效並重新啓動項目,但仍然無效。這個問題只是爲了這個特定的項目而引起的,但是對於一個新的項目我會讓所有的工作都順利進行。

我gradle這個文件

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.1" 

    defaultConfig { 
     applicationId "com.jiit.minor2.shubhamjoshi.human" 
     minSdkVersion 17 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.1.1' 
    compile 'com.android.support:recyclerview-v7:+' 
    compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
    compile 'com.android.support:design:24.1.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'org.jsoup:jsoup:1.8.3' 
    compile 'com.firebase:firebase-client-android:2.5.2+' 
    compile 'com.github.amlcurran.showcaseview:library:5.4.3' 
    compile 'com.firebaseui:firebase-ui:0.3.1' 
    compile files('libs/twitter4j-core-4.0.4.jar') 
} 

我的項目結構

My project structure

在此先感謝。

+0

因爲它只發生在這個項目中,所以我們需要一些關於該項目的更多信息。例如顯示項目目錄。 gradle configs –

+0

@ th3pat3l我已經添加了項目結構和gradle config – 1shubhamjoshi1

回答

7

您的項目沒有任何問題。發生這種情況是因爲您試圖在應用程序中運行drawable。從下拉菜單中選擇應用,然後運行。一切都會安好的。

+0

非常感謝!傻我沒有檢查 – 1shubhamjoshi1

0

我剛剛有同樣的錯誤,但因爲我的單元測試文件不在src/test/java目錄(以前很好)。

將測試類文件移出本地源代碼目錄並進入測試程序解決它(包括少量重構以導入需要測試的類)。

1

App Configuration

這不只是示數錯誤配置。只需選擇應用程序,然後運行。 它會好的。

相關問題