3

I am trying to retrieve the previous android project (maybe from eclipse) and there're tons of errors at first but I've got 4 errors eventually:

  1. Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\WEBSOL3.gradle\caches...\jars\classes.jar
  2. Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
  3. Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
  4. Caused by: com.android.tools.r8.utils.AbortException: Error: Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcms.

For your references, it is okay to syncing with the Gradle files but app running is not available(including making apk file in the test device). there's no build.gradle file on the project level and app level. There's only build.gradle file (Module: my app name) and other gradle files related to the lib.

I already have tried to fix it typing multiDexEnabled=true, version up all the dependencies, added mavenCentral and maven {url}, compileOptions{sourcecompatibilty, targetcompatibility}, etc like almost everything that I have found thru the google search.

Here's my build.gradle (Module: my app name) below.

 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.***.***"
        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'
    }

}
Dave Lee
  • 316
  • 3
  • 9

0 Answers0