Realm 5.15.0 及最新版本 (6.0.2),无法同步 gradle
Realm 5.15.0 and up to latest version (6.0.2), fails gradle sync
我们正在使用 Realm 作为 Android 的数据库框架。当前工作版本是 5.14.0。昨天我们尝试升级到 6.0.2,但 gradle 同步失败。然后我推回版本并看到从 5.15.0 Realm 开始导致 gradle 同步失败并出现错误:
ERROR: Failed to resolve: io.realm:realm-android-library:5.15.0
ERROR: Failed to resolve: io.realm:realm-annotations:5.15.0
和其他一些依赖项因完全相同的错误而失败(但这些可能会受到第一次失败的影响)
当我再次尝试 5.14 版本时,没有出现任何错误,一切都很好。
我检查了 gradle 构建日志,我可以看到这条线出现了很多次:
WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
还有一些像这样的:
WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'project.name' is disabled because the project doesn't contain any valid native configurations.
还有一些:
INFO - ty.VersionCompatibilityChecker - Failed to find version reader for component 'android-gradle-experimental-plugin'
其中之一:
INFO - pl.ProjectRootManagerComponent - project roots have changed
最终:
INFO - e.project.sync.GradleSyncState - Gradle sync failed (50 s 766 ms)
看起来同步开始 SYNC_TASK_CREATED
,一些库下载然后 SETUP_STARTED
。然后它几乎马上就失败了。
有谁知道这里发生了什么以及这可能失败的可能原因吗?我可以添加您可能需要的任何额外信息。
谢谢。
编辑:
我只是 运行 ./gradlew 检查 --stacktrace 以获得有关导致问题的原因的更多信息,我得到了这个:
Could not determine the dependencies of task ':app-name:testProdReleaseUnitTest'.
> Could not resolve all task dependencies for configuration ':app-name:prodReleaseUnitTestRuntimeClasspath'.
> Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
好吧,那是愚蠢的。
我真的应该给错误信息更多的信任...
我加了
mavenLocal()
jcenter()
到
allprojects {
repositories {
}
在根 build.gradle 文件中,现在它找到了 Realm 仓库。呵呵。
感谢所有看这个问题的人。
我们正在使用 Realm 作为 Android 的数据库框架。当前工作版本是 5.14.0。昨天我们尝试升级到 6.0.2,但 gradle 同步失败。然后我推回版本并看到从 5.15.0 Realm 开始导致 gradle 同步失败并出现错误:
ERROR: Failed to resolve: io.realm:realm-android-library:5.15.0
ERROR: Failed to resolve: io.realm:realm-annotations:5.15.0
和其他一些依赖项因完全相同的错误而失败(但这些可能会受到第一次失败的影响)
当我再次尝试 5.14 版本时,没有出现任何错误,一切都很好。 我检查了 gradle 构建日志,我可以看到这条线出现了很多次:
WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
还有一些像这样的:
WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'project.name' is disabled because the project doesn't contain any valid native configurations.
还有一些:
INFO - ty.VersionCompatibilityChecker - Failed to find version reader for component 'android-gradle-experimental-plugin'
其中之一:
INFO - pl.ProjectRootManagerComponent - project roots have changed
最终:
INFO - e.project.sync.GradleSyncState - Gradle sync failed (50 s 766 ms)
看起来同步开始 SYNC_TASK_CREATED
,一些库下载然后 SETUP_STARTED
。然后它几乎马上就失败了。
有谁知道这里发生了什么以及这可能失败的可能原因吗?我可以添加您可能需要的任何额外信息。
谢谢。
编辑: 我只是 运行 ./gradlew 检查 --stacktrace 以获得有关导致问题的原因的更多信息,我得到了这个:
Could not determine the dependencies of task ':app-name:testProdReleaseUnitTest'.
> Could not resolve all task dependencies for configuration ':app-name:prodReleaseUnitTestRuntimeClasspath'.
> Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
好吧,那是愚蠢的。 我真的应该给错误信息更多的信任...
我加了
mavenLocal()
jcenter()
到
allprojects {
repositories {
}
在根 build.gradle 文件中,现在它找到了 Realm 仓库。呵呵。 感谢所有看这个问题的人。