在android studio中设置appium的必要gradle文件是什么

时间:2016-09-27 05:56:17

标签: android appium

我正在学习Appium。请帮我在android studio中设置这个。 我提到了一些文件,但未能正确理解。所以请帮帮我。

添加以下依赖项后

编辑

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.10'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'io.appium:java-client:3.3.0'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'org.apache.httpcomponents:httpclient:4.5.1'
compile 'commons-lang:commons-lang:2.6'
compile 'com.google.code.gson:gson:2.5'
compile 'com.google.http-client:google-http-client:1.21.0'
compile 'com.testdroid:testdroid-api:2.9'
compile 'com.google.http-client:google-http-client-jackson2:1.21.0'

如果我运行我的应用程序,它会显示以下错误

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
  

'com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 1'

1 个答案:

答案 0 :(得分:0)

尝试将multiDexEnabled true添加到您的应用 build.gradle 文件中。

 defaultConfig {
    multiDexEnabled true
}

如果经常发生或第一步没有帮助multiDexEnabled可能会有所帮助。对于那些喜欢深入挖掘的人来说,有几个相似的问题(有更多的答案):

:app:dexDebug ExecException finished with non-zero exit value 2

Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException