Unrecognized Android Studio version - android-studio

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

Related

The specified Android SDK Build Tools version (28.0.3) is ignored

what can i do in this situation? In Android Studio 4, I'm seeing this issue: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.0. Android SDK Build Tools 26.0.2 will be used.
Change your buildToolsVersion to '29.0.2' in build.gradle file.
As on version Android 4.1.2 it says remove buildToolsVersion "28.0.2" from your build.gradle file since it has its own default build tools now and just Sync it. It worked for me.

This version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer

This version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer.
but my android studio version is 3.3.1 and there is no new update from Google
Change Project level gradle as below -
classpath 'com.android.tools.build:gradle:3.3.1'
Change gradle-wrapper.properties as below -
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Hope this will work...
Just Change the classpath to the version of your Android Studio Version.
To Find Version :
Click on help > About > Version is visible.
It will download the Gradle according to your android studio version.
Eg :
If your android studio version is 3.3.2 then change as follow :
classpath 'com.android.tools.build:gradle:3.3.2'
You would need to lower your gradle version in your project build.gradle file.
Hope it helps...

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.

This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer

This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer.
but my android studio version is 3.2.1 and there is no new update from Google
Try to edit your project build.gradle file and set the android build gradle plugin to classpath 'com.android.tools.build:gradle:3.2.1' within the dependency section.
See also the documentation of the android grade plugin
It's a bit late, But easy and effective.
Click on About Android Studio,
Check the current version,
Open build.gradle of Project and put it in front of the class path. e.g Your studio version is 3.5.2, then your classpath should look like this
classpath 'com.android.tools.build:gradle:3.5.2'
You would need to lower your gradle version and android plugin version, or you can download latest version from beta or canary update channels.
To enable updates from other channels go to Help -> Check for Updates -> Congifure automatic updates and in that dialog select channel you want. After selecting check for update again and it will show you latest version.
This issue is caused due to use of newer version of gradle in the project.
There are two options to resolve this:
Option 1:
Change gradle/wrapper/gradle-wrapper.properties file
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Change project level gradle build.gradle file
classpath("com.android.tools.build:gradle:3.3.2")
Option 2:
Update your Android Studio to newer version. (Highly recommended)
In IntelliJ IDEA this is an open bug: https://youtrack.jetbrains.com/issue/IDEA-252823
As a workaround, you can change the build tools version as other people advise.
My project was failing with this dependency:
com.android.tools.build:gradle:7.0.0-alpha03
Now it's working with this:
com.android.tools.build:gradle:4.0.2
As a side note, you should change that dependency in build.gradle in some projects or in dependencies.kt in newer projects.
That was the most updated version that worked.
After an update the Android Studio does not show the layout's design for some reason. I tried newer versions as well, but it did not work. So I decided to downgrade my IDE.
When I opened my project, I got the same error. The solution was the following:
Open the Project Structure.
Select the Project field.
Use the appropriate Android Plugin Version. You can copy it from a new project's structure.
Change the Gradle version too what you need.
OK.
Find the gradle-wrapper.properties file and open it.
Change the distributionUrl to that gradle version url what you saved in the Project Structure.
Or if you don't mind, then you can update your AS.
Had the same Issue when i decided to install another version of Android Studio, what worked for me was:
Creating a new project with the current version of Android Studio just to go check the classpath version at the project level build.gradle inside the dependencies section, at the time it was this:
classpath 'com.android.tools.build:gradle:3.5.0-rc01'
Copied that line and replaced it on the project i was working on.
in project's build.gradle file comment classpath com.android.tools.build:gradle:. File → Project Structure select Android Gradle Plugin Version to match Android Studio version
You can now update your android studio to 3.4 stable version. Updates for stable version are now available. cheers!!!
i just change gradle version classpath 'com.android.tools.build:gradle:3.5.3' to
classpath 'com.android.tools.build:gradle:3.3.2' and now working.
I encountered with this error and just decrease gradle version and android plugin version to 5.1.1 and 3.4.2.
Close VPN worked for me! It suprised me.
this issue occur for me after downgrade Java JDK, after upgrade JDK my problem resolved.
Open android studio then go to help menu > check for update > Update your Android Studio to newer version.
If u r here because of Jetpack Compose, I had the same problem, and solved it by using the Arctic Fox Canary build of Android studio: you can download it at this link: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2020.3.1.12/android-studio-2020.3.1.12-mac.zip
This issue arises due to updates, You can resolve this by downgrading the gradle used from
com.android.tools.build:gradle:3.2.1 to a previous gradle like com.android.tools.build:gradle:3.0.0 or anything older than the current one
This usually happens when you're opening someone else's project after unzipping it. And the person has used an updated android Studio.
The way to solve it is
1.Go to Help and about to see your android studio version
2.Go to File>Project Structure> and set your Android Gradle Plugin version to your android studio version
3.Change the Gradle version to the one you usually use.(optional)
Build the project and it should run without any errors
This seems like incompatible gradle plugin vs gradle binary versions. You can find the releases here: Gradle Plugin release and compatiblity
Upgrade your grade plugin and grade binary to compatible versions and the app should start building.

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