Android Realm 5.15.0及最新版本(6.0.2)无法进行梯度同步
我们使用Realm作为Android的DB框架。目前的工作版本是5.14.0。昨天我们尝试升级到6.0.2,但gradle sync失败。然后我推回了版本,发现从5.15.0领域开始会导致gradle同步失败并出现错误:Android Realm 5.15.0及最新版本(6.0.2)无法进行梯度同步,android,android-studio,realm,realm-mobile-platform,Android,Android Studio,Realm,Realm Mobile Platform,我们使用Realm作为Android的DB框架。目前的工作版本是5.14.0。昨天我们尝试升级到6.0.2,但gradle sync失败。然后我推回了版本,发现从5.15.0领域开始会导致gradle同步失败并出现错误: ERROR: Failed to resolve: io.realm:realm-android-library:5.15.0 ERROR: Failed to resolve: io.realm:realm-annotations:5.15.0 还有一些其他依赖项由于同样的
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\u任务\u创建的
,一些库下载,然后SETUP\u开始了
。然后它几乎马上就失败了
有没有人知道这里发生了什么,以及可能失败的原因?我可以添加您可能需要的任何额外信息
谢谢
编辑:
我刚刚运行了./gradlew check--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()
到
在根build.gradle文件中,现在它找到了领域repo。呵呵。
感谢这个问题的所有观众。这个问题花了我两个小时。谢谢你的修复!
allprojects {
repositories {
}