Java – not found io.realm :realm-gradle-plugin:4. 0.0.pre.rc1

not found io.realm :realm-gradle-plugin:4. 0.0.pre.rc1… here is a solution to the problem.

not found io.realm :realm-gradle-plugin:4. 0.0.pre.rc1

I followed the Getting Started Guide for Android Realm hear

I use the latest android studio version 3.0 RC 1 and the following build.gradle file:

buildscript {

repositories {
    jcenter()
    google()
 }

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-rc1'
    classpath "io.realm:realm-gradle-plugin:4.0.0.pre.rc1"
 }
} 

When I sync gradle, I get the following error message:

Error:Could not find io.realm:realm-gradle-plugin:4.0.0.pre.rc1.
Searched in the following locations:
    file:/D:/98_Downloads/android-studio-ide-171.4392136-windows/android-studio/gradle/m2repository/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/ realm-gradle-plugin-4.0.0.pre.rc1.pom
    file:/D:/98_Downloads/android-studio-ide-171.4392136-windows/android-studio/gradle/m2repository/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/ realm-gradle-plugin-4.0.0.pre.rc1.jar
    https://jcenter.bintray.com/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/realm-gradle-plugin-4.0.0.pre.rc1.pom
    https://jcenter.bintray.com/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/realm-gradle-plugin-4.0.0.pre.rc1.jar
    https://dl.google.com/dl/android/maven2/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/realm-gradle-plugin-4.0.0.pre.rc1.pom
    https://dl.google.com/dl/android/maven2/io/realm/realm-gradle-plugin/4.0.0.pre.rc1/realm-gradle-plugin-4.0.0.pre.rc1.jar
Required by:
    project :

What is my error? Does anyone have an idea? Thanks!

Solution

Yes, it is called 4.0.0-RC1 because of a problem with the documentation.

It will eventually be fixed.


EDIT: In fact, 4.0.0 has now been released, see https://realm.io/docs/java/latest/

Related Problems and Solutions