2017-04-17 4 views
0

グラデーションを正しく調整できません。Auto_value_parcel issue

"警告:android-aptプラグインは、今後のバージョンのAndroid Gradleプラグインと互換性がありません。代わりに 'annotationProcessor'設定を使用してください。

私は多くのオプションを試してみたが、私は本当に

apply plugin: 'com.android.application' 
apply plugin: 'com.android.application' 
apply plugin: 'com.neenbedankt.android-apt' 

repositories { 
    mavenCentral() 
    jcenter() 
    maven { url "https://clojars.org/repo/" } 
} 


android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    defaultConfig { 
     applicationId "hipair.helloworld" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.squareup.retrofit2:retrofit:2.2.0' 
    compile 'com.squareup.okhttp3:logging-interceptor:3.6.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.2.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    apt 'frankiesardo:auto-parcel:1.0.3' 
    testCompile 'junit:junit:4.12' 
    compile 'com.jakewharton:butterknife:8.5.1' 
    apt 'com.jakewharton:butterknife-compiler:8.5.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:cardview-v7:25.3.1' 
    compile 'com.android.support:recyclerview-v7:25.3.1' 

    provided 'com.google.auto.value:auto-value:1.2' 
    apt 'com.google.auto.value:auto-value:1.2' 

    provided 'com.ryanharter.auto.value:auto-value-gson:0.4.6' 
    apt 'com.ryanharter.auto.value:auto-value-gson:0.4.6' 
    apt 'com.ryanharter.auto.value:auto-value-parcel:0.2.5' 

    compile 'com.ryanharter.auto.value:auto-value-parcel-adapter:0.2.5' 
    compile 'javax.annotation:javax.annotation-api:1.2' 
} 


// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     mavenCentral() 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.4.0-alpha6' 
     classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

答えて

0

アンドロイド - のaptの機能は今のAndroidプラグインの一部で書き込むことはできません。組み込みの注釈プロセッサを使用するように移行するには、あなたからのGradleファイルを行

apply plugin: 'com.neenbedankt.android-apt' 

を削除し、annotationProcessoraptを交換してください。

+0

thx!兄。それは役に立ちました。 – surgeon