Gradle project refresh failed, cause http://downloads/.../gradle-2.4.1 - android

I was adding a library to my project which required updating the gradle to 2.4.+ and when changed it and rebuilt the project, I got this error:
What should I do?

It happens because 2.4.1 doesn't exist.
Check here the full list.
In gradle/wrapper/gradle-wrapper.properties file use:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.4-all.zip

Related

Android Studio Gradle dont want to sync

This is first time using Android Studio. and found problem said that
Build file 'C:\Users\anauf\AndroidStudioProjects\Modul1_Kel20_1\build.gradle' line: 8
A problem occurred evaluating root project 'Modul1_Kel20_1'.
Could not find method implementation() for arguments [androidx.appcompat:appcompat:1.2.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
as shown here
i've delete and re download the gradle, but the erorr still remain. anyone can help me please?
Please make sure your Gradle version is 3.*.* or higher before using "implementation"
Open the project level Gradle file
dependencies{
classpath 'com.android.tools.build:gradle:3.1.2'
}
Open the 'gradle-wrapper.properties' file and set the distributionUrl:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
or any latest version. And finally Sync the project.

Warning during App build on Android studio 3.6.1

I just updated Android studio 3.6.1 and while building my app I got following warning:
Configure project :app
WARNING: The following project options are deprecated and have been removed:
android.enableUnitTestBinaryResources
The raw resource for unit test functionality is removed.
What is this warning about and how to remove this?
The robolectric instructions say that this configuration is not necessary with Android Studio 3.3+
So, please check your gradle.properties file and remove this line:
android.enableUnitTestBinaryResources=true
In my case, I just cleared my gradle cache files and that seemed to have resolved the problem
My problem solved by removing configuration at gradle.properties. see below:
#android.enableBuildCache=true

Android studio showing error,gradle file,please find the solution,it shwing some find of error

When I sync my project in Android Studio, I got this error
ERROR: Cause: https://downloads.gradle-dn.com/distributions/gradle-3.4.2-all.zip
I think you have added wrong dependency package.
So Go to gradle > wrapper > gradle-wrapper.properties and checkout your "distributionUrl" has the correct value or not.
You have added a wrong package gradle-3.4.2-all.zip. try changing it to gradle-4.10.2-all.zip
I hope this helps.
Don't confuse gradle with the Android Gradle plugin.
classpath 'com.android.tools.build:gradle:3.4.2'
It is the Android Gradle plugin.
Check the release notes for other versions.
The gradle version is defined in gradle/wrapper/gradle-wrapper.properties.
Use:
distributionUrl = https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

Could not create an instance of Tooling API implementation using the specified Gradle installation

I just downloaded and installed the latest version of android studio (v 1.4). After creating a new project, I see this error about the gradle refresh failure:
Error: Could not create an instance of Tooling API implementation using the specified Gradle installation '/Applications/Android Studio.app/Contents/gradle/gradle-2.4'.
I've tried so many different things that I have found online and no fix. When I open the layout window of the project it says "Gradle project sync failed..."
I am not sure what the error means at all and also do not know how to use any other different version of it.
I had this problem, fix is don't use gradle 2.4 I deleted gradle/gradle 2.4 folder and in gradle/wrapper/ gradle-wrapper-properties in build directory change 'distributionUrl' to another gradle distribution.
Deleting everything in /Library/Java/Extensions/ fixed this for me.
Issue with more info: https://issues.gradle.org/browse/GRADLE-1451
Add lines at the end of eclipse.ini
--illegal-access=warn
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
source

Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'

Today I have updated my Android Studio and I keep getting this error no matter what I do. I imported a project from github everything was running smoothly until I updated now I keep getting this error:
Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'
Possible causes:The project 'my_application' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
Can anyone help out?
The name of this property has changed in v0.14.0 and later of the Android Gradle plugin, so build files created for earlier versions need to be updated. Look through all the build.gradle files in the project, and when you see jniDebugBuild, change it to jniDebuggable.
You may run into other things that need to be renamed; the list of remappings is in the release notes at http://tools.android.com/tech-docs/new-build-system.

Categories

Resources