gpt4 book ai didi

android - 警告:警告:注释处理器 'RELEASE_7'支持的源版本 'android.arch.lifecycle.LifecycleProcessor'小于-source '1.8'

转载 作者:行者123 更新时间:2023-12-03 04:23:09 29 4
gpt4 key购买 nike

尝试使用带有架构组件和Kotlin的Android Studio 3 Canary 5构建示例会给出此警告。

谁能告诉我原因?

谢谢,Ove

编辑#1:
这是Dan Lew前段时间制作的样本

https://github.com/dlew/android-architecture-counter-sample

build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "net.danlew.counter"
minSdkVersion 23
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:${rootProject.ext.supportLibVersion}"
compile "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibVersion}"
compile "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'

compile "android.arch.lifecycle:extensions:${rootProject.archLifecycleVersion}"
compile "android.arch.persistence.room:runtime:${rootProject.archRoomVersion}"
compile "android.arch.persistence.room:rxjava2:${rootProject.archRoomVersion}"
kapt "android.arch.lifecycle:compiler:${rootProject.archLifecycleVersion}"
kapt "android.arch.persistence.room:compiler:${rootProject.archRoomVersion}"
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

String butterKnifeVersion = '8.5.1'
compile "com.jakewharton:butterknife:$butterKnifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

compile 'io.reactivex.rxjava2:rxjava:2.1.0'

String daggerVersion = '2.10'
compile "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

String rxBindingVersion = '2.0.0'
compile "com.jakewharton.rxbinding2:rxbinding:$rxBindingVersion"
compile "com.jakewharton.rxbinding2:rxbinding-kotlin:$rxBindingVersion"

compile 'com.jakewharton.timber:timber:4.5.1'

compile 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
}

repositories {
mavenCentral()
}

最佳答案

现在有一个Java 8注释处理器,拱形组件很稳定,因此请替换:

"android.arch.lifecycle:compiler:${rootProject.archLifecycleVersion}"


"android.arch.lifecycle:common-java8:1.0.0"

关于android - 警告:警告:注释处理器 'RELEASE_7'支持的源版本 'android.arch.lifecycle.LifecycleProcessor'小于-source '1.8',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48918157/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com