UIuto上没有UiDevice类2.1.2

时间:2017-08-13 23:13:08

标签: android automated-tests android-instrumentation

我发现"升级"我在build.gradle到2.1.2中对UIAutomator的引用破坏了我对UiDevice类的任何引用。事实上,很多事情似乎都发生了变化,但我没有发现任何解释。

任何人都可以了解(显然)即将改变的内容吗?

这有效:

androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'

这不是:

androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'

build.gradle的依赖关系(通过尝试解决这个问题搞得一团糟):

testCompile 'junit:junit:4.12'
// Optional -- Mockito framework
testCompile 'org.mockito:mockito-core:1.10.19'

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

// Optional -- UI testing with UI Automator
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestCompile 'com.android.support:support-annotations:26.0.0'
androidTestCompile 'com.android.support.test:runner:1.0.0'
androidTestCompile 'com.android.support.test:rules:1.0.0'
// Optional -- Hamcrest library
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'

// Optional -- UI testing with Espresso
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.android.support:support-v4:26.0.0'

0 个答案:

没有答案