代码之家  ›  专栏  ›  技术社区  ›  Parth Anjaria

意外输入:尝试导入库时ImmutableJarInput

  •  5
  • Parth Anjaria  · 技术社区  · 6 年前

    我正在尝试使用裁剪库:

    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
    

    但是当我清理项目时,我不会遇到任何错误,但是当我运行代码时,我会得到以下错误:

    意外输入: ImmutableJarInput{name=android.arch.lifecycle:运行时:1.0.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\136.jar, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=com.android.support:支持compat:26.1.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\129.jar, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=com.android.support:支持注释:26.1.0, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=android.arch.lifecycle:通用:1.0.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\135.jar, ImmutableJarInput{name=com.android.支持:appcompat-v7:26.1.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\127.jar, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=android.arch.core:通用:1.0.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\137.jar, ImmutableJarInput{name=com.android.support:支持向量drawable:26.1.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\131.jar, ImmutableJarInput{name=com.android.support:支持核心ui:26.1.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\132.jar, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=com.android.support:动画矢量绘图:26.1.0, file=D:\ Projects\Impact\share\app\build\intermediates\transforms\desugar\mainBeta\debug\130.jar, ImmutableJarInput{name=com.android.support:支持核心实用程序:26.1.0, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}, ImmutableJarInput{name=com.android.support:支持片段:26.1.0, contentTypes=CLASSES,scopes=EXTERNAL_LIBRARIES,status=REMOVED}

    这是我的毕业典礼:

        buildscript {
        repositories {
            maven { url 'https://maven.fabric.io/public' }
            mavenCentral()
        }
    
        dependencies {
            classpath 'io.fabric.tools:gradle:1.+'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
    
        }
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        mavenCentral()
        maven { url "https://clojars.org/repo/" }
    }
    
    
    android {
        compileSdkVersion 26
        buildToolsVersion '27.0.3'
        defaultConfig {
            applicationId "com.sharesmile.share"
            minSdkVersion 16
            targetSdkVersion 25
            versionCode 246
            versionName "2.8.1.9"
    
            generatedDensities = []
            vectorDrawables.useSupportLibrary = true
            manifestPlaceholders = [manifestApplicationId          : "${applicationId}",
                                    onesignal_app_id               : "c6288ab1-1ded-48e4-a980-7e7195c54194",
                                    onesignal_google_project_number: "159550091621"]
            multiDexEnabled true
        }
        signingConfigs {
            release {
                storeFile file("impactRunKeyStore.jks")
                storePassword "greenfreedom"
                keyAlias "impactRun"
                keyPassword "greenfreedom"
            }
        }
    
        sourceSets {
            main {
                manifest.srcFile 'src/main/AndroidManifest.xml'
                java.srcDirs = ['src/main/java', 'src/main/java-gen', 'src/main/Kotlin']
                res.srcDirs = ['src/main/res']
            }
    
            beta {
                res.srcDirs = ['src/beta/res']
            }
            main.java.srcDirs += 'src/main/kotlin'
        }
    
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.release
            }
            debug {
                debuggable true
                signingConfig signingConfigs.release
            }
        }
    
        flavorDimensions("main","beta")
        productFlavors {
            main {
                minSdkVersion 16
                dimension = "main"
            }
            beta {
                minSdkVersion 21
                dimension = "beta"
            }
        }
        aaptOptions {
            additionalParameters "--no-version-vectors"
        }
    
        dexOptions {
            jumboMode = true
        }
    
        lintOptions {
            disable 'InvalidPackage'
        }
    
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    
    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        testImplementation 'junit:junit:4.12'
        //    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
        //    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
        //    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
        implementation "com.google.android.gms:play-services-location:$rootProject.playServicesVersion"
        implementation "com.google.android.gms:play-services-maps:$rootProject.playServicesVersion"
        implementation "com.google.android.gms:play-services-fitness:$rootProject.playServicesVersion"
        implementation "com.google.android.gms:play-services-auth:$rootProject.playServicesVersion"
        implementation "com.google.android.gms:play-services-plus:$rootProject.playServicesVersion"
        implementation "com.google.android.gms:play-services-gcm:$rootProject.playServicesVersion"
        implementation "com.google.firebase:firebase-messaging:$rootProject.playServicesVersion"
        implementation "com.google.firebase:firebase-core:$rootProject.playServicesVersion"
        implementation "com.google.firebase:firebase-database:$rootProject.playServicesVersion"
        implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
        implementation "com.android.support:customtabs:$rootProject.supportLibraryVersion"
        implementation "com.android.support:design:$rootProject.supportLibraryVersion"
        implementation "com.android.support:support-v4:$rootProject.supportLibraryVersion"
        implementation "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion"
        implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
        implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
        implementation 'com.squareup.okhttp:okhttp:2.5.0'
        implementation 'com.google.code.gson:gson:2.3.1'
        implementation 'com.squareup.picasso:picasso:2.5.2'
        implementation('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
            transitive = true
        }
        implementation 'com.onesignal:OneSignal:3.6.1@aar'
        implementation 'com.facebook.android:facebook-android-sdk:4.25.0'
        implementation 'com.jakewharton:butterknife:8.0.1'
        annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
        implementation 'de.greenrobot:greendao:2.1.0'
        implementation 'org.greenrobot:eventbus:3.0.0'
        //CirclePageIndicator
        implementation 'com.viewpagerindicator:library:2.4.1@aar'
        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        implementation 'com.clevertap.android:clevertap-android-sdk:3.1.2'
        implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
        implementation('com.github.anshulagarwal06:Lumiere:v1') {
            exclude group: 'com.google.firebase'
        }
        implementation 'com.android.support:multidex:1.0.1'
        implementation 'io.smooch:core:5.4.0'
        implementation 'io.smooch:ui:5.4.0'
        implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
        implementation 'uk.co.samuelwall:material-tap-target-prompt:2.6.0'
        implementation 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.6.+@aar') { transitive = true }
        implementation 'com.amazonaws:aws-android-sdk-s3:2.6.22'
        implementation 'com.amazonaws:aws-android-sdk-cognito:2.6.22'
        implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
    }
    
    apply plugin: 'com.google.gms.google-services'
    

    其中“supportLibraryVersion”定义为project gradle:

    ext{
        supportLibraryVersion = '26.1.0'
        playServicesVersion = '11.6.0'
    }
    
    0 回复  |  直到 6 年前