2016-08-16 22 views
1

すべてのテストをTesting Support Libraryに変換しています。私はこのシンボル「LargeTest」を解決できません

import android.support.test.filters.LargeTest; 

ようLargeTest注釈をインポートしようとすると、しかし、私はCannot resolve symbol 'LargeTest'を取得します。このエラーを解決するには、どのような依存関係をgradleファイルに追加する必要がありますか?

+0

注釈をサポートしていますか? –

+0

@ cricket_007 'androidTestCompile 'com.android.support:support-annotations:24.1.1''の意味ですか?私はこれを既に持っています... –

答えて

0

thisのドキュメントはありますか?

必要に応じて、これらの依存関係の一部を追加する必要があります。

dependencies { 
    androidTestCompile 'com.android.support.test:runner:0.4' 
    // Set this dependency to use JUnit 4 rules 
    androidTestCompile 'com.android.support.test:rules:0.4' 
    // Set this dependency to build and run Espresso tests 
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1' 
    // Set this dependency to build and run UI Automator tests 
    androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' 
} 

そして追加:

android { 
    defaultConfig { 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
} 
+0

"この文書を読んだことはありますか?"はい。それは私の質問でリンクした正確なページです。これらの依存関係をすべて定義し、 'testInstrumentationRunner'を設定しました。 –

1

を次の依存

androidTestCompile 'com.android.support.test:runner:0.5' 

下のフィルタ注釈生活、まだbugを提出してください働いていない場合。

編集:問題はバージョン0.5で導入されたため、依存関係を更新する必要があるということです。

関連する問題