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
Related
Please explain why the first code gives me syncing errors while the second doesn't.
allprojects {
repositories {
jcenter()
google()
}
}
Failed to resolve: play-services-base
Open File
Failed to resolve: play-services-tasks
Open File
Changing the repository order syncs just fine:
allprojects {
repositories {
google()
jcenter()
}
}
Can someone give me a reason or educated guess why this occurs?
This doc might be of use for you:
https://docs.gradle.org/current/userguide/declaring_repositories.html
Right down the bottom it mentions:
Note: The order of declaration determines how Gradle will check for dependencies at runtime. If Gradle finds a module descriptor in a
particular repository, it will attempt to download all of the
artifacts for that module from the same repository. You can learn more
about the inner workings of Gradle’s resolution mechanism.
So this is a little new to me, I am using adblock project and showing my website from webviewer but i want to not show my website's ads into it, so i used adblock project for the same. But somehow i am getting this weird error of not founding
com.google.android.gms:play-services-ads:15.0.0
Failed to resolve: com.google.android.gms:play-services-ads:15.0.0
Install Repository and sync project
Show in File
Show in Project Structure dialog
After i clicked on Install Repository and sync project the SDK manager says
Could not find dependency "com.google.android.gms:play-services-ads:15.0.0"
Configs:
In build.gradle(project)
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://maven.google.com"
}
And in build.gradle(Module:libadblockerplus-android-webviewapp)
dependencies {
compile project(':libadblockplus-android-settings')
compile project(':libadblockplus-android-webview')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services-ads:15.0.0'
}
adding
maven {
url "https://maven.google.com"
}
to the other repositories block in your build.gradle file. Fixed the issue. Thanks #stkent
You should add
maven {
url "https://maven.google.com"
}
to the other repositories block in your build.gradle file.
From your posted snippet, it appears you have already added it to the buildscript block's list of repositories. However, those repositories are only used to search for dependencies for the building of your application. See this SO question for more discussion on the difference between the repositories and buildscript.repositories blocks.
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'
I want to install the following library in my project.
https://android-arsenal.com/details/1/348#!package
I have added the jar file in build folder
I also added the dependencies which are mentioned there.
I also added :
enter code here
maven {
url "https://jitpack.io"
}
But I found this error:
Please! help me to resolve this issue.
You can add this library in your gradle file
compile 'com.github.barteksc:android-pdf-viewer:2.8.2'
here's the link of the library just try it
I just added code in build.gradle file
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
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!