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".
Related
This is a total newb question and I believe it has a very simple solution. My problem is that an imported dependency is not accessible from my MainActivity.kt. I added it like any other dependency and according to the library docs. And I simply can't import the classes I need. They are missing. Any advice?
build.gradle (Module: MyApp)
dependencies {
...
implementation 'com.thelittlefireman:AppKillerManager:2.1.1'
}
Rebuilding the project gives me this error:
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.thelittlefireman:AppKillerManager:2.1.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/thelittlefireman/AppKillerManager/2.1.1/AppKillerManager-2.1.1.pom
- https://repo.maven.apache.org/maven2/com/thelittlefireman/AppKillerManager/2.1.1/AppKillerManager-2.1.1.pom
Required by:
project :app
Added jcenter repository (or whatever it's called) to settings.gradle.
settings.gradle
dependencyResolutionManagement {
repositories {
...
jcenter()
}
}
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.
I already added the android.gradleDep build hint with the proper "compile'....' " hint for the 3rd party library I want to integrate. (In this case, Firebase).
In the root-level build.gradle file in a Codename One Android app, how can I:
add a classpath dependency to the buildscript section?
add a maven dependency in the allprojects section?
EDIT:
3. Add a plugin, such as: apply plugin: 'com.google.gms.google-services'
For a visual example:
buildscript {
dependencies {
classpath 'com.google.gms:google-services:3.1.0' // google-services plugin
}
}
allprojects {
dependencies {
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
I have looked at CN1's page on Build hints but don't know what to do next to import this library. Without these changes, I get the following build error:
Resource missing. [HTTP GET: https://jcenter.bintray.com/com/google/firebase/firebase-
core/11.2.0/firebase-core-11.2.0.pom]
Resource missing. [HTTP HEAD: https://jcenter.bintray.com/com/google/firebase/firebase-
core/11.2.0/firebase-core-11.2.0.jar]
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MyApp'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find com.google.firebase:firebase-core:11.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.pom
https://jcenter.bintray.com/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
file:/tmp/build1801628445736809063xxx/MyApp/libs/firebase-core-11.2.0.jar
file:/tmp/build1801628445736809063xxx/MyApp/libs/firebase-core.jar
file:/home/ec2-user/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.pom
file:/home/ec2-user/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
file:/home/ec2-user/android-sdk/extras/google/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.pom
file:/home/ec2-user/android-sdk/extras/google/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
EDIT In the .properties file, I have:
codename1.arg.android.repositories=maven { url "https\://maven.google.com" };
codename1.arg.android.gradleDep=compile 'com.google.gms\:google-services\:3.1.0', compile 'com.google.firebase\:firebase-core\:11.2.0'
I am getting the following error message:
FAILURE: Build failed with an exception.
* Where:
Build file '/tmp/build1791213618910744158xxx/MyApp/build.gradle' line: 78
* What went wrong:
A problem occurred evaluating root project 'MyApp'.
> Could not find property 'compile' on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated#59ed76e3.
You can add the build-hint that points to your repo URL as well. In your case:
android.gradleDep=compile 'com.google.gms:google-services:3.1.0'
android.repositories=maven { url "https\://maven.google.com" };
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'
}
}
With a blank new project, I get this:
Gradle 'HelloWorld' project refresh failed
Error:Cause: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
When trying to build I get the following Gradle Build error:
Error:A problem occurred configuring root project 'HelloWorld'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:0.12.+.
Required by:
:HelloWorld:unspecified
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
This is a fresh installation of Android Studio, and my build.gradle looks like:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
The first lines of the relevant log error are:
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.12-all.zip'.
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'HelloWorld'.
Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'HelloWorld'.
Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':classpath'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:0.12.+.
Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
The project structure is just the default for a new project with a blank activity:
For me it look like incompatible versions. So this problem is related to this problem: Android Studio says to use Gradle 1.10 - but new version is 1.12?
Try to use gradle 1.10 and delete the the folder of the gradle wrapper.
Try mavenCentral() instead of jcenter()
Looks like this is a known issue..
https://code.google.com/p/android/issues/detail?id=73511