Could not find com.squareup.picasso:picasso:2.5.3-SNAPSHOT - android

I want to compile with com.squareup.picasso:picasso:2.5.3-SNAPSHOT. But i got this error:
Error:Could not find com.squareup.picasso:picasso:2.5.3-SNAPSHOT.
Required by:
familywall-android:app:unspecified
Search in build.gradle files
Have someone experienced something similar?

The Picasso snapshot version you mentioned is not available in the standard maven repo. In your build.gradle add the following dependency to your dependencies block:
dependencies {
// 2.5.3 is no longer updated.
compile 'com.squareup.picasso:picasso:3.0.0-SNAPSHOT'
//...
}
and in the repositories block add
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
//...
}

I found the .jar here, the last version is 21. It worked!

Related

YoutubeExtratctor Android dependency Error

I have an error in this dependency
implementation 'com.github.HaarigerHarald:android-youtubeExtractor:v1.7.0'
and the error is
ERROR: Failed to resolve: com.github.HaarigerHarald:android-youtubeExtractor:v1.7.0
I'm trying to use it to fetch an url of youtube video so that I can use it in Exoplayer
Do you have already the jitpack.io added to your repositories config in the build.gradle file?
Something like
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" } // this is the line that you probably need
}
}
The idea is that gradle needs to know where to find artifacts build from github, this is usually from jitpack.io. By default, this line is not generated in the build.gradle file so you must add it manually.
Hope it helps

Cannot resolve github dependency even though my process is correct

Basically the problem is I cannot resolve GitHub dependency even though I added this to Project level build.gradle.
build.gradle (Project)
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
and app level build.gradle
dependencies {
implementation 'com.github.mukeshsolanki:country-picker-android:<latest-version>'
How can I fix this? What is this cause possibly? I already updated to the lastest version of Android Studio.
In the string implementation 'com.github.mukeshsolanki:country-picker-android:<latest-version>' at the app level build.gradle file you must replace <latest-version> substring with the actual version of the library. Currently the latest version is 2.0.1.
So the result string should be this: implementation 'com.github.mukeshsolanki:country-picker-android:2.0.1'

Unable to install constraint-layout:1.0.2

Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
I see this error when I open my projectI cant install constraint-layout:1.0.2, there is some error strong text
Your project's build.gradle should have the content as below.
All the Google specific dependencies are now hosted on their own Maven Repository.
If you still find it confusing, just create a new Project from scratch using Android Studio 3.0.1 and all the dependencies would be properly configured.
buildscript {
repositories {
google() // Speficically this entry
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
First of all, make sure to update your Android Studio. Second thing, make sure you import the Google maven repository into your project gradle file. Then, you should be able to install ConstraintLayout.
Here's the solution:
repositories {
maven {
url 'https://maven.google.com'
}
}
then add this line in dependencies:
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support.constraint:constraint-layout-solver:1.0.2'

Making android github project available via gradle

I have created a library project using android studio and uploaded it on Github
What I want to do is, make the project available to anyone wanting to use it with this simple gradle command.
dependencies {
compile 'com.github.myprojectname'
}
How can I do it?
To use a project in github with gradle:
publish it in MavenCentral or Jcenter
use JitPack
In this case add the repo:
repositories {
// ...
maven { url "https://jitpack.io" }
}
and add the dependency like this:
dependencies {
compile 'com.github.User:Repo:Tag'
}
If you want to publish an artifact on MavenCentral, you can read this post.
You should upload your project on maven central or jcenter or on your own repository somewhere on the internet.
Then in the gradle.build your users specify:
repositories {
mavenCentral()
}
or similar and then they specify your dependency
dependencies {
compile 'com.github.myprojectname+'
}

Gradle syncing keeps failing

I'm trying to include Android Asynchronous Http Client and Picasso into my Android project using Gradle. Here's my build.gradle file.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
dependencies {
compile 'com.loopj.android:android-async-http:1.4.4'
compile 'com.squareup.picasso:picasso:2.1.1'
}
}
When I try to sync it, I keep getting the following error.
No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (java.lang.String) values: [com.loopj.android:android-async-http:1.4.4]
Possible solutions: module(java.lang.Object)
I'm very new to Android so I'm clueless on how to correct this. Can anyone please help me out? I'm using Android Studio version 0.5.8 by the way.
Thank you.
Don't include dependencies in your top-level build file. Include them in module-level build files instead. If you use the Project Structure UI instead of modifying build files directly, it will set things up properly.

Categories

Resources