Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android gradle Assembly AAR库中存在重复的类定义_Android_Android Studio_Gradle_Build_Android Gradle Plugin - Fatal编程技术网

Android gradle Assembly AAR库中存在重复的类定义

Android gradle Assembly AAR库中存在重复的类定义,android,android-studio,gradle,build,android-gradle-plugin,Android,Android Studio,Gradle,Build,Android Gradle Plugin,我正在Android Studio中以完美的调试模式编译AAR库,但当使用ProGuard发布时,会出现以下错误: 我的身材,格雷德尔 buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.google.gm

我正在Android Studio中以完美的调试模式编译AAR库,但当使用ProGuard发布时,会出现以下错误:

我的身材,格雷德尔

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:3.2.0'
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28


    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 28
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    externalNativeBuild {
        cmake {
            version '3.10.2'
            path "src/main/cpp/CMakeLists.txt"
        }
    }

    repositories{
        flatDir{
            dirs 'libs'
        }
        /** Following lines are for accessing the TapLinx jars from Repo directly */
        maven {
            credentials {
                username "sdkuser"
                password "taplinx"
            }
            url "http://maven.taplinx.nxp.com/nexus/content/repositories/taplinx/"
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    testImplementation 'junit:junit:4.13-beta-3'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.9'
    implementation 'com.google.android.gms:play-services-analytics:15.0.2'
    implementation 'com.google.firebase:firebase-core:15.0.2'
    implementation 'com.google.firebase:firebase-messaging:15.0.2'
    implementation('taplinx-android:nxpnfcandroidlib:1.6@aar') {
        transitive = true
        changing = true
    }


}
我的错误日志是:


这是Taplinx版本在1.7中解决的一个错误这是Taplinx版本在1.7中解决的一个错误更新您的proguard规则以添加“-ignorewarnings”。如果我添加这个类。jar为空更新您的proguard规则以添加“-ignorewarnings”。如果我添加这个类。jar为空
Reading library jar [/Users/andresflorespolicarpo/Library/Android/sdk/platforms/android-28/android.jar]
Reading library jar [/Users/andresflorespolicarpo/Library/Android/sdk/platforms/android-28/optional/org.apache.http.legacy.jar]
Reading library jar [/Users/andresflorespolicarpo/Library/Android/sdk/platforms/android-28/optional/android.test.mock.jar]
Reading library jar [/Users/andresflorespolicarpo/Library/Android/sdk/platforms/android-28/optional/android.test.base.jar]
Reading library jar [/Users/andresflorespolicarpo/Library/Android/sdk/platforms/android-28/optional/android.test.runner.jar]
Note: there were 1 duplicate class definitions.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning: there were 1 classes in incorrectly named files.
         You should make sure all file names correspond to their class names.
         The directory hierarchies must correspond to the package hierarchies.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
         If you don't mind the mentioned classes not being written out,
         you could try your luck using the '-ignorewarnings' option.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':taplinx:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
40 actionable tasks: 32 executed, 8 up-to-date
12:56:13: Task execution finished 'assemble'.