Realm Gradle 'examples' project refresh failed - android

I have downloaded realm example projects from Github
I Imported that project.
Finally I got this below error.
Realm Gradle 'examples' project refresh failed
Error:Could not find io.realm:realm-gradle-plugin:1.2.0-SNAPSHOT.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/maven-metadata.xml
file:/Applications/Android Studio.app/Contents/gradle/m2repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.jar
file:/Users/govindaraj/.m2/repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/maven-metadata.xml
file:/Users/govindaraj/.m2/repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.pom
file:/Users/govindaraj/.m2/repository/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.jar
https://jcenter.bintray.com/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/maven-metadata.xml
https://jcenter.bintray.com/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.pom
https://jcenter.bintray.com/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.jar
https://jitpack.io/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/maven-metadata.xml
https://jitpack.io/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.pom
https://jitpack.io/io/realm/realm-gradle-plugin/1.2.0-SNAPSHOT/realm-gradle-plugin-1.2.0-SNAPSHOT.jar
Required by:
io.realm:encryptionExample:1.2.0-SNAPSHOT
How can I solve this?

If you cloned our entire repo, you need to run ./gradlew assemble from the top-level directory first. It could probably be stressed more in our README

Make sure you have the snapshot repository in your build.gradle
buildscript {
repositories {
maven {
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}
dependencies {
classpath "io.realm:realm-gradle-plugin:<version>-SNAPSHOT"
}
}
repositories {
maven {
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}

Related

ERROR: Failed to resolve: com.github.imperiumlabs:GeoFirestore-Android:v1.5.0

When I add the following dependency in my gradle:
...
implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.5.0'
}
I get:
ERROR: Failed to resolve: com.github.imperiumlabs:GeoFirestore-Android:v1.5.0
Show in Project Structure dialog
Affected Modules: app
I tried to install a previous version (1.4.0) but was met with the same error.
Is there any way around this?
Here is the package in question
Have you enabled Jitpack in your project? This is needed, along with the 'implementation' code that you showed up here.
https://github.com/imperiumlabs/GeoFirestore-Android#enable-jitpack
Enable Jitpack
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

A problem occurred configuring project ':react-native-vector-icons'

What went wrong:
A problem occurred configuring project ':react-native-vector-icons'.
Could not resolve all files for configuration ':react-native-vector-icons:classpath'.
Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
https://jcenter.bintray.com/com/android/tools/build/gradle/
Required by:
project :react-native-vector-icons
Try below workaround
subprojects {
if (project.name.contains('react-native-vector-icons')) {
buildscript {
repositories {
jcenter()
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
you should try again today as the jCenter services were taken down due to some miscommunication. Now all the packages are restored.

android studio gradle error when compiling

My Android studio is giving me errors when I try to compile, it has been working since for sometime now but recently it gives me this error:
Could not find any matches for com.android.tools.build:gradle:+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
https://jcenter.bintray.com/com/android/tools/build/gradle/
file:/Users/macbook/.m2/repository/com/android/tools/build/gradle/maven-metadata.xml
file:/Users/macbook/.m2/repository/com/android/tools/build/gradle/
Required by:
unspecified:unspecified:unspecified
Add maven { url "https://dl.bintray.com/android/android-tools/" } to you android/build.gradle:
buildscript {
repositories {
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}

Could not find gradle 2.2.0-rc1

After updating to Android Studio 2.2 RC, it asked me to update gradle plugin to 2.2.0-rc1. When I update I get the following error:
Error:Could not find com.android.tools.build:gradle:2.2.0-rc1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0-rc1/gradle-2.2.0-rc1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0-rc1/gradle-2.2.0-rc1.jar
Required by:
:my_project:unspecified
Any clues on how I may fix it?
According to: https://code.google.com/p/android/issues/detail?id=221529
The problem is already fixed (exactly: hour ago). Just for sure rebuild your project.
Replace jcenter() instead of mavenCentral() in your project level build.gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}

Problems using jitpack.io with Android Gradle

I'm currently trying to add dependencies with jitpack. I've followed the basic instructions:
repositories {
maven {
url "https:jitpack.io"
}
}
dependencies {
compile 'com.github.User:Repo:Tag'
}
But I'm still getting the following error:
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.github.jitpack:maven-simple:4f1c2c9033.
Searched in the following locations:
https:/#/jcenter.bintray.com/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.pom
https:/#/jcenter.bintray.com/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.jar
https:/#/jitpack.io/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.pom
https:/#/jitpack.io/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.jar
https:/#/repo1.maven.org/maven2/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.pom
https:/#/repo1.maven.org/maven2/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.jar
file:/C:/sdk/extras/android/m2repository/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.pom
file:/C:/sdk/extras/android/m2repository/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.jar
file:/C:/sdk/extras/google/m2repository/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.pom
file:/C:/sdk/extras/google/m2repository/com/github/jitpack/maven-simple/4f1c2c9033/maven-simple-4f1c2c9033.jar
Required by:
Plate:app:unspecified
Your jitpack url looks wrong.
It's:
url "https:jitpack.io"
but in my opinion it should be:
url "https://jitpack.io".

Categories

Resources