找到了多个文件,它们具有与操作系统无关的路径,并不断重复吗?

时间:2019-03-30 19:31:32

标签: java android

伙计们,我正在开发android应用程序,但每次遇到以下错误时,都发现了多个与OS无关的文件,我添加了必要的打包选项。 下面的截图来自android studio。我遵循了许多stackoverflow解决方案,也许您有一些建议。screenshot from android studio

在我的app.gradle文件下面

应用插件:“ com.android.application”

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/androidx.appcompat_appcompat.version'
        exclude 'META-INF/androidx.drawerlayout_drawerlayout.version'
        exclude  'META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version'
        exclude 'META-INF/androidx.loader_loader.version'
        exclude 'META-INF/androidx.viewpager_viewpager.version'
        exclude  'META-INF/androidx.core_core.version'
        exclude 'META-INF/androidx.slidingpanelayout_slidingpanelayout.version'
        exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'
        exclude 'META-INF/proguard/androidx-annotations.pro'
        exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
        exclude 'META-INF/androidx.vectordrawable_vectordrawable.version'
        exclude 'META-INF/androidx.versionedparcelable_versionedparcelable.version'
        exclude 'META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version'
        exclude 'META-INF/androidx.cursoradapter_cursoradapter.version'
        exclude 'META-INF/androidx.print_print.version'
        exclude 'META-INF/androidx.vectordrawable_vectordrawable-animated.version'

    }


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    compileSdkVersion 28
    defaultConfig {
        applicationId "edgar.yodgorbek.sportnews"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.jakewharton:butterknife:10.1.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
}

0 个答案:

没有答案