Ошибка Android: введите com.google.android.gms.common.internal.zzf в качестве интерфейса из `com.google.android.gms.internal.zzcms` - PullRequest
2 голосов
/ 09 мая 2019

Я пытаюсь получить предыдущий проект Android (может быть, из затмения) , и вначале куча ошибок, но в итоге я получил 4 ошибки:

  1. Вызывается: com.android.builder.dexing.DexArchiveBuilderException: Не удалось обработать C: \ Users \ WEBSOL3.gradle \ caches ... \ jars \ classes.jar
  2. Вызывается: com.android.builder.dexing.DexArchiveBuilderException: ошибка во время dexing.
  3. Причина: com.android.builder.dexing.DexArchiveBuilderException: Ошибка во время dexing.
  4. Причина: com.android.tools.r8.utils.AbortException: ошибка: введите com.google.android.gms.common.internal.zzf в качестве интерфейса для com.google.android.gms.internal.zzcms.

Для справок можно синхронизировать файлы Gradleно приложение не доступно (включая создание файла apk в тестовом устройстве).На уровне проекта и уровня приложения нет файла build.gradle.Есть только файл build.gradle (Модуль: имя моего приложения) и другие файлы gradle, связанные с lib.

Я уже пытался исправить это, набрав multiDexEnabled = true, версировав все зависимости, добавив mavenCentral и maven {url}, compileOptions {sourcecompatibilty, targetcompatibility} и т. Д., Как почти все, что я нашел через Googleпоиск.

Вот мой build.gradle (Модуль: имя моего приложения) ниже.

 buildscript {
    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
        mavenCentral()
        maven { url "https://maven.google.com" }
        google()
//        google()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'com.google.gms:google-services:4.2.0'                                            // 4.2.0 available
    }
}

allprojects {
    // added by davelee 
//    tasks.withType(JavaCompile) { options.encoding = 'EUC-KR' }
    tasks.withType(Javadoc) {
//        options.addStringOption('Xdoclint:none', '-quiet')
        options.addStringOption('encoding', 'EUC-KR')
        options.addStringOption('encoding', 'UTF-8')
        options.addStringOption('encoding', 'x-windows-949')
    }

    repositories {
        maven { url "https://dl.bintray.com/buzzvil/buzzscreen/" }
        maven { url "http://dl.appnext.com/" }
        maven { url "https://maven.google.com" }                                                    // added by davelee
    }


    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }
}

apply plugin: 'android'

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    implementation fileTree(include: '*.jar', dir: 'libs')
    implementation project(path: ':PullToRefrechlibrary')
    implementation 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2'
    //noinspection UseOfBundledGooglePlayServices
    implementation 'com.google.android.gms:play-services:12.0.0'
    implementation 'com.google.code.gson:gson:2.8.4'
    implementation files('libs/tnkad-sdk.jar')
    implementation project(path: ':fineadkeyboardsdk')
    implementation files('libs/gcm.jar')
    implementation files('libs/CappSDK_201705250.jar')
    implementation files('libs/org.apache.httpcomponents.httpclient_4.2.5.jar')
    implementation files('libs/httpcore-4.4.4.jar')
    implementation project(path: ':Stealthaddplatformbrowser_lib_sw_1.2.11')
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.guava:guava:25.0-android'


    // davelee
//        implementation ('com.google.android.ads.consent:consent-library:1.0.6') {
//            exclude module: 'gson.FieldAttributes'
//        }
    configurations {
//        all*.exclude group: 'com.google.gson.FieldAttributes'
//        all*.exclude group: 'com.google.code.gson'
//        all*.exclude group: 'com.squareup.okhttp3'
//        all*.exclude group: 'com.squareup.okio'
//        all*.exclude group: 'com.android.support',module:'support-v13'
    }
}


android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.sportsseoul.pinkfinger"
        minSdkVersion 21
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 66
        versionName "1.45"
    }
    // added by davelee
//    compileOptions.encoding = 'windows-1251'

    compileOptions {
//        encoding 'EUC-KR'
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
//        instrumentTest.setRoot('tests')
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }


//    dexOptions{
//        jumboMode true
//        incremental true
//        javaMaxHeapSize="4g"
//    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }

    lintOptions {
        disable 'MissingTranslation'
    }

    dependencies {
        implementation 'com.android.support:multidex:1.0.3'
    }

}
...