У меня есть следующая структура проекта:
+--
| \-- app
| \-- my-lib
К my-lib
Я добавил зависимости:
implementation "android.arch.persistence.room:runtime:2.1.0-alpha02"
kapt "android.arch.persistence.room:compiler:2.1.0-alpha02"
Я попытался получить доступ к @DatabaseView
и обнаружил, что это не такt существует Когда я посмотрел во вкладке «Внешние библиотеки» идею, я обнаружил, что 2.1.0-alpha02 заменен на 2.0.0-rc01
Я былпытаясь найти, откуда это может появиться, но нет места, где я мог бы добавить его
Я пытался ./gradlew clean --refresh-dependencies --debug
и даже не смог найти упоминание о 2.1.0-alpha02 Событие Gradle не пытается разрешить его, но разрешает 2.0.0-rc01 :
16:08:17.414 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Resolve androidx.room:room-runtime:2.0.0-rc01' started
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
16:08:17.414 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Build operation root.1.81.85 could not be started (4 worker(s) in use).
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.jar
16:08:17.414 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.pom
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71' in repository '/var/local/android-sdk/extras/m2repository'.
16:08:17.415 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver] Attempting to resolve component for androidx.room:room-runtime:2.0.0-rc01 using repositories [/var/local/android-sdk/extras/m2repository, /var/local/android-sdk/extras/google/m2repository, /var/local/android-sdk/extras/android/m2repository, Google, BintrayJCenter, MavenRepo]
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.jar
16:08:17.415 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.jar
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71 [changing = false]
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71' in repository '/var/local/android-sdk/extras/m2repository'.
16:08:17.415 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://dl.google.com:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'androidx.room:room-runtime:2.0.0-rc01' in repository '/var/local/android-sdk/extras/m2repository'.
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: androidx.room:room-runtime:2.0.0-rc01 [changing = false]
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71 [changing = false]
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.pom
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.jar
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.jar
16:08:17.415 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/google/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.jar
16:08:17.415 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 28][route: {s}->https://dl.google.com:443][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 20]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'androidx.room:room-runtime:2.0.0-rc01' in repository '/var/local/android-sdk/extras/google/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: androidx.room:room-runtime:2.0.0-rc01 [changing = false]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71' in repository '/var/local/android-sdk/extras/google/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71' in repository '/var/local/android-sdk/extras/google/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71 [changing = false]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71 [changing = false]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.416 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://dl.google.com:443
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.jar
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.pom
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.jar
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'androidx.room:room-runtime:2.0.0-rc01' in repository '/var/local/android-sdk/extras/android/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: androidx.room:room-runtime:2.0.0-rc01 [changing = false]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Cached meta-data for module must be refreshed: will perform fresh resolve of 'androidx.room:room-runtime:2.0.0-rc01' in 'Google'
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71' in repository '/var/local/android-sdk/extras/android/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetadataCache] Recording absence of module descriptor in cache: org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71 [changing = false]
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/var/local/android-sdk/extras/android/m2repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.jar
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71' in repository '/var/local/android-sdk/extras/android/m2repository'.
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Cached meta-data for missing module is expired: will perform fresh resolve of 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.2.71' in 'Google'
16:08:17.416 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.416 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.pom
16:08:17.416 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.2.71/kotlin-android-extensions-runtime-1.2.71.pom
16:08:17.416 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Metadata of https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom' started
16:08:17.416 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource metadata: https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
16:08:17.416 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP HEAD: https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.0.0-rc01/room-runtime-2.0.0-rc01.pom
Затем я попытался взглянуть на третью зависимость, чтобы понять, кто мог ее вызвать:
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.71
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71
| \--- org.jetbrains:annotations:13.0
\--- android.arch.persistence.room:runtime:2.1.0-alpha02 -> androidx.room:room-runtime:2.0.0-rc01
+--- androidx.room:room-common:2.0.0-rc01
| \--- androidx.annotation:annotation:1.0.0-rc01
+--- androidx.sqlite:sqlite-framework:2.0.0-rc01
| +--- androidx.annotation:annotation:1.0.0-rc01
| \--- androidx.sqlite:sqlite:2.0.0-rc01
| \--- androidx.annotation:annotation:1.0.0-rc01
+--- androidx.sqlite:sqlite:2.0.0-rc01 (*)
+--- androidx.arch.core:core-runtime:2.0.0-rc01
| +--- androidx.annotation:annotation:1.0.0-rc01
| \--- androidx.arch.core:core-common:2.0.0-rc01
| \--- androidx.annotation:annotation:1.0.0-rc01
\--- androidx.legacy:legacy-support-core-utils:1.0.0-rc01
+--- androidx.annotation:annotation:1.0.0-rc01
+--- androidx.core:core:1.0.0-rc01
| +--- androidx.annotation:annotation:1.0.0-rc01
| +--- androidx.collection:collection:1.0.0-rc01
| | \--- androidx.annotation:annotation:1.0.0-rc01
| \--- androidx.versionedparcelable:versionedparcelable:1.0.0-rc01
| +--- androidx.annotation:annotation:1.0.0-rc01
| \--- androidx.collection:collection:1.0.0-rc01 (*)
+--- androidx.documentfile:documentfile:1.0.0-rc01
| \--- androidx.annotation:annotation:1.0.0-rc01
+--- androidx.loader:loader:1.0.0-rc01
| +--- androidx.annotation:annotation:1.0.0-rc01
| \--- androidx.core:core:1.0.0-rc01 (*)
+--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc01
| \--- androidx.annotation:annotation:1.0.0-rc01
\--- androidx.print:print:1.0.0-rc01
\--- androidx.annotation:annotation:1.0.0-rc01
Модуль my-lib
содержит только зависимости комнаты, я не понимаю, кто может заставить 2.0.0-rc01
Я пытался форсировать 2.1.0-alpha02 :
configurations.all {
resolutionStrategy {
force "android.arch.persistence.room:runtime:2.1.0-alpha02"
force "android.arch.persistence.room:compiler:2.1.0-alpha02"
}
}
Но это мне не помоглоЯ много раз перестраивал проект с очисткой кеша - это тоже не помогло
Репозитории, которые я использую в своем проекте:
google()
jcenter()
mavenCentral()
- Плагин Gradle равен 3.2.1
- kotlin-gradle-plugin is 1.2.71
- поддержка lib равна 28.0.0
androidx
включена в свойствах gradle
Кто-нибудь сталкивался с чем-то подобным