我正在将所有支持/应用程序兼容库迁移到androidx。
进行所有更新之后,由于此错误,我无法构建项目

:app:processDebugManifest UP-TO-DATE
AGPBI: {"kind":"error","text":"error: resource android:attr/fontVariationSettings not found.","sources":[{"file":"/Users/xxx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/7cae290a69b05f5ffc25283e26a7eb4a/res/values/values.xml","position":{"startLine":250,"startColumn":4,"startOffset":27058,"endColumn":68,"endOffset":27122}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource android:attr/ttcIndex not found.","sources":[{"file":"/Users/xxx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/7cae290a69b05f5ffc25283e26a7eb4a/res/values/values.xml","position":{"startLine":250,"startColumn":4,"startOffset":27058,"endColumn":68,"endOffset":27122}}],"original":"","tool":"AAPT"}
:app:processDebugResources

我试图一一列出所有依赖项,以找出导致问题的原因。仅在删除 session 室库¯\ _(ツ)_ /¯时才能构建

https://developer.android.com/topic/libraries/architecture/adding-components#room

这很奇怪,因为问题似乎来自样式化的资源,但是房间只是一个数据库库。

是否有人有任何想法或解决方案来包含空间而不破坏所有内容?

===============================

我的conf:
compileSdkVersion 27
buildToolsVersion 27.0.3

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 27
}

dependencies {
    // ROOM
    implementation ('androidx.room:room-runtime:' + androidxRoomVersion)
    implementation ('androidx.room:room-rxjava2:' + androidxRoomVersion)
    implementation ('androidx.room:room-guava:' + androidxRoomVersion)
    kapt ('androidx.room:room-compiler:' + androidxRoomVersion)
}

使用:androidxRoomVersion = 2.0.0-alpha1

最佳答案

设置您的compileSdkVersion 'android-P'targetSdkVersion 28
编辑:现在compileSdkVersion 28也应该起作用,这意味着您不再需要将其设置为android-P

08-04 09:11