Grade version 2.6 required. Current version is 2.4 - android-studio

I am trying to use the experimental plugin to build NDK via Android Studio.
I have checked my "Open Module Settings->Project->Gradle version" and confirmed it is 2.6
gradle-wrapper.properties contains:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
android.project\build.gradle contains:
classpath "com.android.tools.build:gradle-experimental:0.3.0-alpha7"
My C:\Program Files\Android\Android Studio\gradle folder contains all gradle versions from gradle-2.4 thru gradle-2.8
Why does Android Studio continue to think that Gradle 2.4 is installed/in use?

Have you checked the preference page Build, Execution, Deployment > Build Tools > Gradle? Perhaps Use local gradle distribution is checked with an old Gradle version specified in the Gradle Home: field.

Related

Unrecognized Android Studio version

Unrecognized Android Studio (or Android Support plugin for IntelliJ IDEA) version '202.7660.26.42.7486908', please retry with version 2020.3.1 or newer.
To solve this issue you can either open your project with android studio version 2020.3.1 or just change Android Gradle Plugin Version in the project stucture settings to the version that your Android Studio supports, I use Android Studio 4.2.2 so I changed the version to 4.2.2 and it works for me.
1. Why
It happens if the Intellij Android Support plugin version used has a lower major/minor version than the current Android Gradle plugin
2. How
You have three options.
Add android.injected.studio.version.check=false to gradle.properties to temporary stop AGP version checking
Upgrade Android Studio to the newest version (Maybe the Canary builds)
Preview builds can be installed side by side with stable versions.(Sugguest)
Downgrade Android Gradle Plugin Version to fit your Android Studio
Read More
1- change your go-to the build.gradle -> in allprojects -> repositories then change the jcenter() to mavenCentral()
2- open file ->project structure -> project -> change the Android Gradle Plugin Version to 4.2.2 and gradle version to 7.0.2
This is one of the main problems of this error.
This happens because of the Intellij android support plugin has a lower major/minor version than the Current gradle plugin.
To fix this error please go through these steps
open file ->project structure -> project -> change the Android Gradle Plugin Version to 4.2.2 and gradle version to 7.0.2
This step fixes my error.
Thank You
T

I need to solve this problem about android studio

As you can see here is my problem with android studio I have been looking for solutions 3 days now but I didn't find any
Minimum supported Gradle version is 6.1.1 current version is 5.2.1
Please fix the project's gradle settings.
Fix gradle wrapper and re-import project
Open gradle wrapper properties
Gradle settings
Go to File > Project Structure > Project and change your Gradle Version there.

Force Android Studio to use gradle 4.1

I have downloaded a previous version of Android Studio (3.0.1) since I must use the android gradle plugin version 3.0.1 and gradle 4.1.
The code, and the other modules it depends on, were written using Android Studio 3.2, kotlin 1.3.10 and gradle version 4.10.2
When I try to synchronize the project with the older version of Android Studio (3.0.1) or running gradlew assembleDebug it says the minimum gradle version is 4.6 even though the gradle wrapper version is 4.1 and the gradle plugin version is 3.0.1. The kotlin version for all dependencies was set on 1.2.41
This is the error:
Minimum supported Gradle version is 4.6. Current version is 4.1.
Please fix the project's Gradle settings. Fix Gradle wrapper and
re-import project Gradle settings
How can I compile such project using older the older version?
You have to use newer gradle wrapper and plugin in order to compile your project, if you want to use AS 3.2. So there is two options for you - upgrade wrapper and plugin, or downgrade AS, plugin, wrapper and kotlin in all dependencies.

Where is gradle build tools version set?

I have installed sdk build tools version 28.0.2, and set buildToolsVersion = "28.0.2" in build.gradle. Yet when I run ./gradlew installDebug, I get an error message saying The SDK Build Tools revision (23.0.1) is too low for project.
I even UNinstalled version 23.01.1 via the android studio sdk manager - but then when I run gradlew it reinstalled it!
I ran grep -ri buildtool * to try and find where it might be, but the only reference I could find was in build.grade.
I managed to work around this by upgrading my gradle version to 3.1.0. But as a result, I now get this message:
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.0.
Which tells me that the SDK Build Tools version is being set... somewhere!
Where else is the required build tools version set? How do I change it so that gradle will use the latest version, rather than being stuck on an old one?
I had the same problem. The buildtoolsversion is defined in build.gradle(Module.app).
I removed this line from the file and then the warning disappeared.

Where to install the gradle wrapper plugin with android studio

Android Studio tells me that the current gradle wrapper 2.8 is outdated and I should update to 2.10.
Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\data\AndroidStudioProjects[projectname]\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
I changed the url in gradle-wrapper.properties to gradle-2.10-all.zip but that didn't do anything.
I followed this answer to get gradle version 2.10:
Error:(1, 0) Plugin with id 'com.android.application' not found
But how of where do I install this plugin in Android Studio so it knows where to find it?
Go to:
Settings > Builds,Execution,Deployment > Build Tools > Gradle >Project-level settings
and set: Use default gradle wrapper
This tells Android studio to use the wrapper version from the file that you just updated.

Resources