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()
}
}
Related
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
I recently updated my android studio to 3.2 and now i have this error on build :
Could not find com.android.tools.build:aapt2:3.2.0-4818971.
Searched in the following locations:
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
file:/C:/Users/me/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
file:/C:/Users/me/.m2/repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
file:/C:/Users/me/.m2/repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
https://repo.maven.apache.org/maven2/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
https://repo.maven.apache.org/maven2/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
https://oss.sonatype.org/content/repositories/releases/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
https://oss.sonatype.org/content/repositories/releases/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
Required by:
project :android
What is this ? and how to fix it ?
Add google() do your build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
Following solved my issue under jar folder there are 3 folders, one of the folder consists of the aapt2.exe in it. I copied that file to other folder where I am getting error.
ex: path of jar: C:\Users\umabhavania\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar
error path: C:\Users\umabhavania\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\a57a698502c21bfe8cfc3ed6eb102b39\aapt2-3.2.1-4818971-windows
copied aapt2.exe file from 57f15fb82085ec9389484ff7e041344f folder to a57a698502c21bfe8cfc3ed6eb102b39
Hope this helps..
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.
Hi guys when im importing my android project I am getting an error 'Failed to resolve: com.android.support.constraint:constraint.layout:1.0.0.Please help.
try com.android.support.constraint:constraint.layout:1.0.0.
It looks like a simple typo.
Did you add the Google maven repository? Your allprojects part of your
project's build.gradle file should look something like this
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
when i add compile 'com.github.npanigrahy:Custom-Calendar-View:v1.0'
in my gradle.build
it gives an error : Error:(23, 13) Failed to resolve: com.github.npanigrahy:Custom-Calendar-View:v1.0
thank in advance
Use this in the build.gradle(Project:calender) file
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
And this in build.gradle(module:app)
dependencies {
compile 'com.github.npanigrahy:Custom-Calendar-View:v1.0'
}
First,you should check your android-studio settings,Do you set a http proxy?
Secondly,according the tutorial in https://github.com/npanigrahy/Custom-Calendar-View
Thirdly,Would you like download the dependency into your local matchine then dependent into your project??