Plugin is too old - android

I know this question isn't new, but I really couldn't find the solution for me.
Im getting the
Plugin is too old, please update to a more recent version, or set
ANDROID_DAILY_OVERRIDE environment variable to
"3915652b2897b86e86ec1d347be9193f1139098e"
error while trying to build the project.
build.gradle classpath:
classpath 'com.android.tools.build:gradle:2.2.0-alpha2'
wrapper:
distributionUrl = https\://services.gradle.org/distributions/gradle-2.10-all.zip
now when I`m using lower version of gradle it builds the project but the instant run isn't working because it requires the alpha2.
any ideas?

Current version of gradle plugin is 2.2.0-alpha4
You can find the name of latest version in the Bintray repository or on the badge in the bottom of the answer :)
[ ![Download] 2]3

Related

How I can fix "Warning: Mapping new ns" about flutter in vsc

I try this one
when I try to "sync project with gradle files" a warning pops up
but I can't find buildToolsVersion
and
I try to search for solution for fix this problem
the other is download gradle
but I can't install anywhere
then
please help me to fix this problem
thankyou for your kindness
https://www.img.in.th/image/PQZxbH
ensure your sdk version and build version match up, I had the same issues because my build version in android/app/build.gradle targetSDKVersion wasn't the same as my sdk version in my emulator. I now have them both set to 30 and this went away
It might be a little bit late for you but I write a solution for this problem for those who have the same problem:
Go to android/gradle/wrapper/gradle-wrapper.properties and add the replace the distributionUrl=.... with the following line:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
Go to android/build.gradle and replace the com.android.tools.build line with the following:
buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.1' } }
Go to android/app/build.gradle and update the android/app/build.gradle. For example:
android { compileSdkVersion 31}
run flutter clean in the terminal.
This solves the Mapping new ns Problem, but in the future you might want to upgrade your gradle build tools version, compiled SDK Version or gradle version, so these version numbers can be changed but AGP
and Gradle versions have to be compatible.
here you find which Android Gradle Plugin Version is compatible with which Gradle Version.

How to upgrade the gradle in a react native app

I am working on a react-native project which has gradle version of 4.4 (can be found in project folder /android/.gradle/4.4) but I want to upgrade it to latest one which is 6.0.1. Please help me
I want to change the version in red to 6.0.1(latest) not the one in white
Inside android>gradle>wrapper>gradle-wrapper.properties
update the distributionUrl to your specific gradle like :
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
Hope it helps. feel free for doubts
Change gradle version here:
android/gradle/wrapper/gradle-wrapper.properties
in:distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Then you need to change the plugin version in:
android/build.gradle
classpath("com.android.tools.build:gradle:4.2.0")
You can see the gradle version for each plugin here:
https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle
In android/build.gradle you have to edit this line
classpath 'com.android.tools.build:gradle:x.y.z'
Change x.y.z with the version you want. Edit it with Android Studio then click Sync now

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

Issue with Kotlin Gradle plugin in android studio

I just upgrade Android studio to the last version (3.2.1) and an issue occurred while charging my project. The Kotlin Gradle plugin seems to be incompatible with the current Android Gradle plugin version, or something like that.
Here's the message displayed:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'Projetpelican' is using version 1.2.41.
I can't find any satisfying answer on the web so please enlight me with your knowledge.
PS. A similar topic had already been created but it does not fully answer the question...
in your build gradle
change 1.2.41 to following
buildscript {
ext {
kotlin_version = '1.3.10'
I hope this help you
Update your Kotlin version.
Under your project-level build.gradle (the one outside of the app folder), find the ext.kotlin_version variable and set it to '1.3.11'.
When maintaining an Android project, you need to keep an eye out for yellow-highlighted dependencies. Android Studio doesn't update them for you.

Android studio : gradle project sync failed

im studying android development for a month
and in my project the gradle version is
code:
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
today when i lunched to android studio i got the error
"Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to..."
what should i do?
how to update for the latest version gradle?.
Thanks for the help!
Looks like alpha6 is out now - https://bintray.com/android/android-tools/com.android.tools.build.gradle/view
I think you have update you sdk and tool, so try the new plugin, maybe alpha4 to alpha6 version:
classpath 'com.android.tools.build:gradle:2.0.0-alpha5'
I have same problem you can find version of gradle here:
https://bintray.com/android/android-tools/com.android.tools.build.gradle/view
and change the version to
classpath 'com.android.tools.build:gradle:2.0.0'
also you have error importing this version you can change the version of grader home in gradle-wrapper.properties to:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
rebuild project and it should work

Categories

Resources