【问题标题】:Program type already present: android.support.v7.util.AsyncListUtil$1程序类型已经存在:android.support.v7.util.AsyncListUtil$1
【发布时间】:2019-02-17 13:53:40
【问题描述】:

我认识到已经存在几个“程序类型已经存在”的问题,但似乎没有一个问题能够完全解决(或帮助解决)我的情况: 我收到“程序类型已经存在:android.support.v7.util.AsyncListUtil$1” - 我认为这是从 exoplayer 2.7 更新时开始的。到 exoplayer 2.8

Program type already present: android.support.v7.util.AsyncListUtil$1
Message{kind=ERROR, text=Program type already present: android.support.v7.util.AsyncListUtil$1, sources=[Unknown source file], tool name=Optional.of(D8)}

Android Studio 一度停止抱怨 AsynListUtil,但开始对 Annotations.AnyRef 说同样的话

build.gradle 粘贴在下面。任何帮助,将不胜感激。我已经解决了 Android Studio 标记的所有依赖项/库冲突,并完成了“工具 > 清理项目”、“工具 > 重建项目”和“文件 > 使缓存无效/重新启动”

apply plugin: 'com.android.application'

android {
    signingConfigs {
        release {
            keyAlias 'sotdaakey'
            keyPassword 'sotdaamerc'
            storeFile file('C:/Users/Doug/AndroidStudioProjects/SpeakerDayAA_fromscratch/local files/keystores/android.jks')
            storePassword 'sotdmerc'
        }
    }
    compileSdkVersion 27
    defaultConfig {
        applicationId 'com.hintonworx.speakerdayaa'
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 8
        versionName '1.6'
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.release
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    flavorDimensions "recovery"
    productFlavors {
        aa {
            //applicationId 'com.hintonworx.speakerday.aa'
            applicationId 'com.hintonworx.speakerdayaa'
            // must use this because AA version was originally published this way
            testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
        }
        na {
            applicationId 'com.hintonworx.speakerday.na'
            testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    // make customtabs 27.1.1 explicit, because play-services-ads:15.0.1 uses an earlier version
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.android.exoplayer:exoplayer:2.8.4'
    implementation 'com.google.android.exoplayer:extension-mediasession:2.8.4'
    implementation 'com.google.android.exoplayer:extension-ima:2.8.4'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:support-v13:27.1.1'
    implementation 'com.jakewharton.timber:timber:4.1.1'
    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    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 'commons-io:commons-io:2.5'
}

更新:

我开始认为它可能与 Firebase 相关,根据:Android Studio- Program type already present: com.google.android.gms.internal.measurement.zzwp

因此在我的代码中删除了 Firebase 依赖项和引用,但仍然得到:

Program type already present: android.support.annotation.AnyRes
Message{kind=ERROR, text=Program type already present: android.support.annotation.AnyRes, sources=[Unknown source file], tool name=Optional.of(D8)}

【问题讨论】:

    标签: java android mobile


    【解决方案1】:

    解决了。就我而言,我在 /libs 文件夹中找到了 android-support-v4-23.1.1 和 android-support-v7-recyclerview-23.1.1 。在更新 exoplayer 和 Firebase 之前,他们并没有给我带来问题。删除那些允许我再次编译和部署而不会出错。不完全确定他们最初是如何到达那里的,但我认为他们是从广告中介网络的库包安装中遗留下来的。

    【讨论】:

      猜你喜欢
      • 2018-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2019-06-22
      • 1970-01-01
      相关资源
      最近更新 更多