Messages Greadle Build
build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.example.administrator.uiautomatortests" minSdkVersion 24 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } //ADD THESE LINES: packagingOptions { exclude 'LICENSE.txt' } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' //Add this line,the version must same with compile's version androidTestCompile 'com.android.support:support-annotations:26.0.1' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' //引入Uiautomator androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1' implementation files('libs/selenium-support-2.53.1.jar') implementation files('libs/selenium-android-driver.jar') implementation files('libs/selenium-java-2.53.1.jar') implementation files('libs/selenium-server-standalone-3.4.0.jar') }