Android 添加应用程序依赖项后出现渐变生成错误
我希望使用appium进行自动化测试(我正在使用Android Studio for dev)。Android 添加应用程序依赖项后出现渐变生成错误,android,android-studio,appium,Android,Android Studio,Appium,我希望使用appium进行自动化测试(我正在使用Android Studio for dev)。我为appium添加了一个渐变依赖项。但是,由于以下警告和非零退出错误,我无法运行该应用。 Warning:Dependency org.apache.httpcomponents:httpclient:4.4.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
我为appium添加了一个渐变依赖项。
但是,由于以下警告和非零退出错误,我无法运行该应用。
Warning:Dependency org.apache.httpcomponents:httpclient:4.4.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
错误如下:
> Error:Execution failed for task ':app:preDexDebug'.
> java.lang.IllegalArgumentException: Source
> D:\Learning\GDLearning\app\build\intermediates\pre-dexed\debug\websocket-client-9.2.11.v20150529-344b13c53e6f4871f43101e675dc9239cd9ab46b.jar
> and destination
> D:\Learning\GDLearning\app\build\intermediates\pre-dexed\debug\websocket-client-9.2.11.v20150529-344b13c53e6f4871f43101e675dc9239cd9ab46b.jar
> must be different
我的build.gradle文件是:apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.gdlearning"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions{
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile('com.google.api-client:google-api-client-android:1.20.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-tasks:v1-rev41-1.20.0') {
exclude group: 'org.apache.httpcomponents'
}
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'io.appium:java-client:3.2.0'
}
任何建议/帮助都会很好
我进行了探索,尝试了一些方法,但没有成功。您不需要将appium依赖项推送到app Build.gradle文件中。 你所需要做的就是按照官方页面上的说明去做 也许你应该:
1) Download Appium
2) Setting Evironment variables (ANDROID_HOME, JAVA_HOME, ..)
3) Play with the Appium
4) Write some test code
这意味着我不能用Android Studio来做这个?我将需要切换到eclispse或intelli J,不需要。您应该使用Android Studio创建APK文件。然后使用Appium为该APK文件编写测试。我在哪里编写这些测试用例?如何运行这些测试?嗯,请先参考说明。当你不知道该怎么做的时候就去寻求帮助。