java.lang.IllegalArgumentException: дубликат символа в таблице с типом ресурса 'id' и именем символа ''

    apply plugin: 'com.android.application'

dependencies {
    implementation fileTree(include: '*.jar', dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    // implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.android.support:design:27.1.1'
    // compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    //compile 'com.android.support:appcompat-v7:27.1.0'
    //    compile 'com.android.support:design:27.1.0'
    //    compile 'com.android.support:recyclerview-v7:27.1.0'
    //    compile 'com.android.support:multidex:1.0.0'
    //apache-mime4j-0.6.jar
    implementation files('libs/apache-mime4j-0.6.jar')
    //implementation 'com.mcxiaoke.volley:library-aar:1.0.19'
   // //compile 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.google.firebase:firebase-messaging:11.0.4'
    implementation 'com.google.android.gms:play-services:11.0.4'
    // implementation 'com.google.code.gson:gson:2.6.2'
    testImplementation 'junit:junit:4.12'
    implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
    implementation('org.apache.httpcomponents:httpmime:4.3') {
        exclude module: "httpclient"
    }
}
buildscript {
    repositories {
        jcenter()
        google()
        maven { url '// url \'https://maven.google.com\'' }
        mavenCentral()
    }

    dependencies {

        classpath 'com.android.tools.build:gradle:3.1.1'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}
android {

    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.main.xxxxx"
        versionCode 89
        versionName "1.0.1.89"
        minSdkVersion 14
        targetSdkVersion 27
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        // Enabling multidex support.
        multiDexEnabled true
    }
    useLibrary  'org.apache.http.legacy'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    android {
      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'
          exclude 'META-INF/ASL2.0'



        }

    }
    defaultConfig {
        multiDexEnabled true
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        androidTest.setRoot('tests')
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }


    }
//apply plugin: 'com.google.gms.google-services'

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

Приведенный выше код затмения проекта, преобразованного Android Studio после Gradle тьфу. это работает Android Studio 2.2, но теперь обновите Android Studio 3.1.1 в то время, когда она показывается (java.lang.IllegalArgumentException: дублирующий символ в таблице с типом ресурса 'id' и именем символа ''). пожалуйста, кто-нибудь ответьте, пожалуйста. вот какая ошибка

0 ответов

Другие вопросы по тегам