Closed quoc-huynh-cosee closed 9 months ago
Same issue here
Same issue
I solve this problem of mine by deleting my android folder and run flutter create .
which reverts back my build.gradle
and make sure that you have a copy of your android folder if you have lots of modification on it.
this is my root level build.gradle
buildscript
:
buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
app level build.gradle
android:
android {
namespace "com.example.example_app"
compileSdkVersion 33
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "com.example.example_app"
minSdkVersion 23
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
I'm receiving an error if I try to build/run an android app with image_gallery_saver.
My app/build.gradle contains these lines, which triggers the error. These lines are added by default if we are creating a new flutter project.
Other packages like package_info_plus also have these lines in the android/app/build.gradle.