Flutter gradle, kotlin version issues

8142


I have updated my kotlin version to latest, and from them I have started getting the following error while startup

flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Build file '/root/my-app/android/app/build.gradle' line: 25
                                                                        
* What went wrong:                                                      
A problem occurred evaluating project ':app'.                           
> Failed to apply plugin [id 'kotlin-android']                          
   > The current Gradle version 5.6.4 is not compatible with the Kotlin Gradle plugin. Please use Gradle 6.1 or newer, or the previous version of the Kotlin plugin.
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 629ms                                                   
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                      1,286ms
Exception: Gradle task assembleDebug failed with exit code 1

1 Answer

3 years ago by

Update your gradle-allversion too.

Goto file gradle-wrapper.properties and change gradle-all to gradle-6.7.1-all

3 years ago by Karthik Divi