I'm developing a flutter plugin for anroid and when I try to compile my build.gradle in android studio but when it compiles it throws my the following error:
Minimum supported Gradle version is 7.2. Current version is 7.1. Please fix the project's Gradle settings. Gradle Settings.
When I update the version in my build.gradle it throws me the same error but whit the new version. The project didn't generate me a gradle wrapper properties files whe i use the following commands:
fvm flutter create --template=plugin plugin-name
fvm flutter create -t plugin --platforms android .
The following is my build.gradle file
group 'com.example.scan'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.1.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main {
jniLibs.srcDirs = ['libs']
}
}
defaultConfig {
minSdkVersion 18
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation files('src/libs/libscanner.jar')
}