什么';Android Espresso软件包“Android.support.test.Espresso.intent”的依赖关系是什么?
我遇到了一个有趣的包,其中特别包含用于测试意图发送的类,以及IntentMatchers类,如Intents类页面上列出的代码片段所示:什么';Android Espresso软件包“Android.support.test.Espresso.intent”的依赖关系是什么?,android,testing,android-intent,dependencies,android-espresso,Android,Testing,Android Intent,Dependencies,Android Espresso,我遇到了一个有趣的包,其中特别包含用于测试意图发送的类,以及IntentMatchers类,如Intents类页面上列出的代码片段所示: Intent resultData = new Intent(); String phoneNumber = "123-345-6789"; resultData.putExtra("phone", phoneNumber); ActivityResult result = new ActivityResult(Activity.RESULT_OK, resu
Intent resultData = new Intent();
String phoneNumber = "123-345-6789";
resultData.putExtra("phone", phoneNumber);
ActivityResult result = new ActivityResult(Activity.RESULT_OK, resultData);
// Set up result stubbing when an intent sent to "contacts" is seen.
intending(toPackage("com.android.contacts")).respondWith(result));
但当我开始尝试时,安卓工作室抱怨不知道这些课程。我检查了上列出的浓缩咖啡罐(Espresso core和Espresso contrib),确实在这些罐中找不到任何android.support.test.Espresso.intent
软件包。是否缺少任何依赖项?您还需要
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2'
有关更多信息,请参阅