错误:在OS独立路径'META-INF / DEPENDENCIES'中找到多个文件 [英] Error: More than one file was found with OS independent path 'META-INF/DEPENDENCIES'

查看:4643
本文介绍了错误:在OS独立路径'META-INF / DEPENDENCIES'中找到多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java中使用Selenium制作应用程序。我一直收到这个错误,我一直在网上找出问题所在,我找不到任何东西。请帮忙。

I am using Selenium in Java to make an app. I keep getting this error and I have been searching the internet to figure out what is wrong and I cannot find anything. Please help.

这是我的build.gradle:

Here is my build.gradle:

    android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "luke.luke.seleniumtest"
        minSdkVersion 15
        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'
        }
    }
}



dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation files('libs/byte-buddy-1.7.9.jar')
    implementation files('libs/client-combined-3.9.1.jar')
    implementation files('libs/commons-codec-1.10.jar')
    implementation files('libs/commons-exec-1.3.jar')
    implementation files('libs/commons-logging-1.2.jar')
    implementation files('libs/gson-2.8.2.jar')
    implementation files('libs/guava-23.6-jre.jar')
    implementation files('libs/httpclient-4.5.3.jar')
    implementation files('libs/httpcore-4.4.6.jar')
    implementation files('libs/okhttp-3.9.1.jar')
    implementation files('libs/okio-1.13.0.jar')
}


推荐答案

首先,尝试添加以下行:排除'META-INF / DEPENDENCIES',然后运行'app'

First, try to add this line: exclude 'META-INF/DEPENDENCIES', then Run 'app'

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
    }
}

如果错误继续发生:'META-INF / INDEX.LIST',继续添加排除'META-INF / INDEX.LIST':

If error continue occur: 'META-INF/INDEX.LIST', keep adding exclude 'META-INF/INDEX.LIST':

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/INDEX.LIST'
    }
}

我的成功!

这篇关于错误:在OS独立路径'META-INF / DEPENDENCIES'中找到多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆