buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
allprojects {
repositories {
google()
mavenCentral()
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
subprojects {
project.evaluationDependsOn(':app')
task clean(type: Delete) {
delete rootProject.buildDir
I found a solution for that here:
Why am I getting this warning and how to resolve it "This version only understands SDK XML versions up to 2 but an SDK XML..."
But then I ran into similar problem as yours.
AFAIK the main problem is the limitations in the libraries we are using, and that it isn't prepared for the level we want to.
If you use AS and look here:
under Flutter plugins, and find the module which is complaining
In my case it was "location:", and if you expand the "android" folder here you can find the contents of the gradle file:
AS you see, the level of 'ext.kotlin_version' is 1.4.20, which is too low.
Either we need to find a new provider to our libraries, try to convince the creator to release an updated version, or try to manually change it (I personally don't like to tamper with libraries that way).
–
I encountered this error using the receive_sharing_intent package. Turns out the com.android.tools.build dependency was out of date.
Pull Request
Until that gets merged you can use this dependency statement:
receive_sharing_intent:
url: https://github.com/Thogsit/receive_sharing_intent
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.