使用操作系统独立路径'version.properties'找到多个文件

时间:2019-01-15 16:47:08

标签: android rabbitmq build.gradle

我一直在构建RabbitMQ应用,但遇到构建错误。我不断收到此错误

“找到了多个文件,这些文件具有与操作系统无关的路径'version.properties'“

我的应用程序build.gradle如下:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.rssw.amq_application"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        packagingOptions {
            pickFirst  'META-INF/*'
            exclude 'org/apache/http/version.properties'
            exclude 'org/apache/http/client/version.properties'
            exclude 'META-INF/LICENSE'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.rabbitmq:amqp-client:5.5.2'
}

下面给出了我的项目的Gadle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

当我构建项目时,它可以正常工作,但是当我运行项目时,它会出现此错误。

我已尽一切努力来解决此问题,但事实证明所有结果都是失败的。这是一个学校项目,其评分很高。感谢您为解决此问题提供的帮助。

谢谢

0 个答案:

没有答案