2017-07-15 11 views
0

エスプレッソライブラリをgradleで追加しようとすると、このエラーメッセージが表示されます。どうすれば修正できますか?Android Espresso Framework app(25.3.1)とtest app(23.1.1)のエラーを解決しました。エラー

+0

のStackOverflowへようこそを使用するなどのアクションをテストするために使用このコードを。 [ツアー](http://stackoverflow.com/tour)を見て、[ヘルプセンター](http://stackoverflow.com/help)を読んで[質問する方法]を読んでください。 (http://stackoverflow.com/help/how-to-ask)、[どのような質問を避けるべきですか?](http://stackoverflow.com/help/dont-ask)、[MCVE:最小、完全、および検証可能な例](http://stackoverflow.com/help/mcve)あなたの周りの人があなたが何を意味するのか、何が問題なのかを簡単に読んで理解することができれば助けてくれるでしょう:) – Dwhitz

答えて

2

問題は、エスプレッソはあなたより古いバージョンのサポートライブラリを使用しているということです。すでにプロジェクトに入っているので、エスプレッソから除外してください。 だから、あなたのbuild.gradleファイルに、あなたは交換する必要があります。

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 

と:

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 

あなたはより多くの競合を持っている場合は、(APPCOMPAT、デザインなどのように)より多くのサポートモジュールを除いてみてください。

+0

コメントありがとうございました。 –

1

recyclerview

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2', { 

    exclude group: 'com.android.support', module: 'appcompact' 
    exclude group: 'com.android.support', module: 'support-v4' 
    exclude group: 'com.android.support', module: 'support-annotations' 
    exclude module: 'recyclerview-v7' 
}) 

か、他

compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
exclude group: 'com.android.support', module: 'appcompact' 
     exclude group: 'com.android.support', module: 'support-v4' 
     exclude group: 'com.android.support', module: 'support-annotations' 
exclude module: 'recyclerview-v7' 
    }) 
関連する問題