I am trying to build existing project in android studio 3.2.1 and I am using
com.github.worker8:RadioGroupPlus:v1.0.1 this dependency in the project though it was working in android studio 2.1 and now when I am building it in android studio 3.2.1 it throws
Failed to resolve: com.github.worker8:RadioGroupPlus:v1.0.1 this error.
Any help is appreciated.
From RadioGroupPlus Jitpack page.
Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.worker8:radiogroupplus:v1.0.1'
}
The difference is using radiogroupplus instead of RadioGroupPlus.
Related
I have upgraded the my exiting project Gradle version from older version to "com.android.tools.build:gradle:7.0.4".
After upgrading the build version some of the existing libraries not working.
I got an error like below:
Failed to resolve: com.yarolegovich:discrete-scrollview:1.5.1 Show in
Project Structure dialog Affected Modules: app
Failed to resolve: com.redmadrobot:input-mask-android:6.0.0 Show in
Project Structure dialog Affected Modules: app
Failed to resolve: gun0912.ted:tedpermission:2.2.3 Show in Project
Structure dialog Affected Modules: app
Failed to resolve: com.theartofdev.edmodo:android-image-cropper:2.8.0
Show in Project Structure dialog Affected Modules: app
Failed to resolve: com.wang.avi:library:2.1.3 Show in Project
Structure dialog Affected Modules: app
We recommend using a newer Android Gradle plugin to use compileSdk =
32
This Android Gradle plugin (7.0.4) was tested up to compileSdk = 31
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=32 to this project's gradle.properties
The build will continue, but you are strongly encouraged to update
your project to use a newer Android Gradle Plugin that has been tested
with compileSdk = 32 Affected Modules: app
Please help me to get out this error.
Thanks in advance.
in your build.gradle.app file there must be property called compileSdk which could be 31 or 32. change it to smaller values and try again.
I had the same problem. But I just run the project and it ran without any problems. But the errors still persist.
I think the problem is with Android Studio cache.
However, we have to wait until the next update.
Step 1:
Update the Gradle version & all libraries.
Step 2:
Remove allprojects { } from project-level build.gradle file.
Step 3:
Replace project-level repositories {} with below code
repositories {
maven {
url "PROJECT DEPENDENCY URL" Ex. : https://maven.google.com, https://jitpack.io
}
google()
mavenCentral()
gradlePluginPortal()
}
Step 4:
Same repositories {} code we have to add in settings.gradle file like below:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven {
url "PROJECT DEPENDENCY URL" Ex. : https://maven.google.com, https://jitpack.io
}
google()
mavenCentral()
gradlePluginPortal()
}
}
Step 5:
Sync Gradle, clean the project & run.
I hope these steps will help you to upgrade the project from the old Gradle version to the new Gradle version 7.0.+.
Add jcenter() in your project level build.gradle like below
allprojects {
repositories {
jcenter()
}}
and
buildscript {
repositories {
jcenter()
}
dependencies {...}}
hope it works, as some of the libraries still in Jcenter()
Actually, I'm trying to create a dependency in android and I'm receiving like No build artifacts found and this is my gradle screenshot:
and this is log receiving from jitpack.io
This is log error
Help me to create dependency. I'm using android studio 4.1
Did you try adding jcenter() as well in your repositories?
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
./gradlew install
update gradle version
After updating android studio to 3.1, suddenly it will gives error if I add a new dependency for example:
dependencies {
compile 'com.github.florent37:android-slidr:1.0.4'
}
it gives this error :
Failed to resolve: com.github.florent37:android-slidr:1.0.4
Also all my themes in my style gives red error and said Cannot resolve symbol 'Theme' but if I run my app it works very interesting issue.
Failed to resolve: com.github.florent37:android-slidr:1.0.4
Make sure you added below in your Project Level build.gradle section.
allprojects {
repositories {
.........
maven {
url "http://dl.bintray.com/florent37/maven"
}
}
FYI
If same problem coming, You can use OLD version
compile 'com.github.florent37:android-slidr:1.0.3'
Same, but version 1.0.3 worked for me.
dependencies {
compile 'com.github.florent37:android-slidr:1.0.3'
}
try this
Failed to resolve: com.android.support:support-v13:27.0.1
in my project I am using 25 , but it is showing error for 27.
I opened Android studio project, which was already developed.
Project was built successfully, but after few days suddenly this error came up in gradle sync.
I have installed build tools for 27 and sync with that, but it is still giving same error.
I think it is because of vcs or git used in project, is it possible?
or any other reason ? how to solve it?
Thanks
Add this code in your gradle
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
}
}
After updating Android Studio to 0.8.7 my Gradle wont sync.
I use local distribution of gradle 2.0 which Android studio downloaded. In settings I have set url to use that local distribution from .gradle.
Here's my build.gradle and below:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0'
}
}
Error:Could not find com.android.tools.build:gradle:2.0.
Searched in the following locations:
http://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0/gradle-2.0.pom
http://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0/gradle-2.0.jar
Required by:
:App:unspecified
The latest version of the Gradle Android plugin (com.android.tools.build:gradle) is 0.11.1, and it supports Gradle 1.10-1.12 (see docs).