为什么在构建项目时不断出现`isBoxedPrimitive()`错误?

时间:2017-10-09 17:09:58

标签: android auto-value

Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > java.lang.NoSuchMethodError: com.squareup.javapoet.TypeName.isBoxedPrimitive()Z

使用auto-value-parcelauto-value-firebase时,我一直收到同样的错误。该项目无需添加依赖项和用法即可运行。但是当我将它们添加回来时,问题就会恢复。请查看我的app/build.gradle文件

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "PACKAGE"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/rxjava.properties'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile 'com.google.code.findbugs:jsr305:3.0.1'
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    // Android Support Libraries
    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support:recyclerview-v7:26.0.1'
    compile 'com.android.support:exifinterface:26.0.1'

    // JavaPoet
    annotationProcessor 'com.squareup:javapoet:1.8.0'
    provided 'com.squareup:javapoet:1.8.0'

    // Dagger 2
    compile 'com.google.dagger:dagger:2.4'
    provided 'javax.annotation:jsr250-api:1.0'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.4'

    // AutoValue
    provided 'com.google.auto.value:auto-value:1.5'
    annotationProcessor 'com.google.auto.value:auto-value:1.5'

    // AutoParcel
    annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

    // AutoValue Firebase
    annotationProcessor 'me.mattlogan.auto.value:auto-value-firebase:1.1.0'
    provided 'me.mattlogan.auto.value:auto-value-firebase-annotation:1.1.0'

    // Firebase
    compile 'com.google.firebase:firebase-database:11.4.0'
    compile 'com.google.firebase:firebase-auth:11.4.0'
    compile 'com.github.frangsierra:rx2firebase:1.1.3'

    // RxJava 2
    compile 'io.reactivex.rxjava2:rxjava:2.1.0'
    compile 'com.akaita.java:rxjava2-debug:1.2.0'

    // RxAndroid 2
    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'

    // RxLifecycle 2
    compile 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1'

    // RxBinding 2
    compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'

    // Simple Stack
    compile 'com.github.Zhuinden:simple-stack:1.7.2'

    // Butterknife
    compile 'com.jakewharton:butterknife:8.4.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'

    // Timber
    compile 'com.jakewharton.timber:timber:4.3.1'

    // SwipyRefreshLayout
    compile 'com.github.orangegangsters:swipy:1.2.3@aar'

    // Glide
    compile 'com.github.bumptech.glide:glide:4.1.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'

    // Glide Transformations
    compile 'jp.wasabeef:glide-transformations:2.0.2'

    // Calligraphy
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'

    // Lorem Ipsum Generator
    compile 'de.sven-jacobs:loremipsum:1.0'

    // Pretty Time
    compile 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'

    // Flexible AdannotationProcessorers
    compile 'eu.davidea:flexible-adapter:5.0.0-rc2'

    // Animated Checkbox
    compile 'com.hanks.animatecheckbox:library:0.1'

    // EventBus
    compile 'org.greenrobot:eventbus:3.0.0'

    // Parceler
    compile 'org.parceler:parceler-api:1.1.6'
    annotationProcessor 'org.parceler:parceler:1.1.6'

    //PhotoView
    compile 'com.github.chrisbanes:PhotoView:2.0.0'

    // Android Image Cropper
    compile 'com.theartofdev.edmodo:android-image-cropper:2.4.4'

    // File Chooser
    compile 'com.droidninja:filepicker:2.0.8@aar'

    // Intl Phone Input
    compile 'net.rimoto:intlphoneinput:1.0.1'
}


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

0 个答案:

没有答案