I recently updated android studio to version 3.2. When I tried running my old project, I got the following message for my old project while running grade build:
"The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher.
Project '4thtry' is using version 1.2.50." How to rectify it?
If gradle --version works, but all of your builds fail with the same error, it is possible there is a problem with one of your Gradle build configuration scripts. You can verify the problem is with Gradle scripts by running gradle help which executes configuration scripts, but no Gradle tasks.
For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.
For the best performance, you should use the latest possible version of both Gradle and the plugin. When you update Android Studio, you may receive a prompt to automatically update the Android Gradle plugin to the latest available version. You can choose to accept the update or manually specify a version based on your project’s build requirements.
The Android Studio uses Gradle to help add features to the Android apps. It is advised to keep the Gradle version up-to-date and compatible in tandem with the Android Studio. If your Gradle version is not updated you might also get the below error – Generating signed Bundle requires you to update the Android Gradle plugin to version x.y.z or higher
Some of the Gradle files may get deleted unexpectedly. So when you will start building your apps you will get to see an error in Android studio as ‘ Error running android: Gradle project sync failed. In this article, we will take a look at 3 different methods for solving this issue.
Sorry, something went wrong. This is caused by upgrading to Android gradle plugin 2.3 (com.android.tools.build:gradle:2.3.0). In previous versions of the plugin the databinding package name (where the BR file is generated) was provided on an annotation in a generate file.
Go to your root Build.gradle
and update the Kotlin
.
(Better idea): Add the latest version: ext.kotlin_version = '1.2.71'
(or above of 1.2.50
) instead of 1.2.50
then rebuild the project.
So we'll have;
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
..
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With