ERROR: No build artifacts found - Android studio (4.1) - android

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

Related

Gradle build error: Could not find semver4j-0.16.4-nodeps.jar

I recently started seeing a build error in our CircleCI build:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4).
Searched in the following locations:
https://jitpack.io/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar
Re-running the job sometimes allows the build to complete, even though when I locally attempt to load that URL (https://jitpack.io/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar), I get an error: "Not found in JitPack repository".
I tried running the build locally with the --refresh-dependencies gradle option, and I was able to reproduce the error... but only once. With no changes to my build.gradle file, the build succeeded the next time I tried it.
I found that the Kotlin gradle plugin's dependency on semver4j was modified in this commit, making it an embedded dependency. I was hopeful that upgrading the Kotlin gradle plugin to 1.7.0 would pick up this change, but I'm not sure that it did; it certainly didn't fix my CircleCI build issues.
I did confirm that jitpack is included in the repositories section of our build.gradle file:
maven { url "https://jitpack.io" }
I'm hoping someone else has a fix for this, or some gradle magic that can serve as a workaround?
buildscript {
repositories {
maven { url 'https://jitpack.io' } //-> Delete
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j' //-> Add
}
}
In buildscript { repositories {
delete "maven { url 'https://jitpack.io' }"
put in "maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}"
In allprojects { repositories {
put in "maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}"
but over
"maven { url 'https://jitpack.io' }"
Looks like some Jitpack's services are suffering an outage, check it out on https://status.jitpack.io/

Failed to resolve library after upgrading the build version to 7.0

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()

Failed to resolve: com.github.worker8:RadioGroupPlus:v1.0.1

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.

importing android studio 1.2 project to android studio 3.0

i upgraded to android studio 3.0 from android studio 1.2
currently i cannot work on any of my old projects on android 3.0, been getting a lot of gradle build errors
example
Error:(1, 0) Minimum supported Gradle version is 3.3. Current version is 2.2.1.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import projectGradle settings
Android Studio 3.0 using Gradle-4.1 and
Android-gradle-plugin 3.0.0
Find gradle folder inside your project
Open gradle-wrapper.properties and change
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Open root build.gradle file and change in buildscript
classpath 'com.android.tools.build:gradle:3.0.0'
Additionally you need to add google() repo link in project repositories list and buildScript repo list.
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
jcenter()
google() //<- Add
}

Android Build Failed in Running the Project While Building APK Works Fine

I have got a new mac from the company and cloned the project from the Git. Works fine on my Windows PC.
However it fails on the mac with this message:
Error:org.gradle.api.UnknownTaskException: Task with path 'dexBetaDebug' not found in project ':app'.
Cleaning, rebuilding, and building APK works fine but when I want to run it on my device, it fails.
Any ideas?
I looked deep into gradle logs and saw Crashlytics causes the problem, and ridicolously solved the problem by setting fabric dependency version speficially in app gradle.
Problematic code was like this:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
I solved it by changing it like this:
classpath 'io.fabric.tools:gradle:1.21.6'
It is really disappointing that the recent version of fabric causes the problem.

Categories

Resources