-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAILURE: Build failed with an exception. #15
Comments
Let me see your build.gradle and gradle.properties, or download the example plugin project from github and build, then compare with your project |
I have the same problem. Is any solution ? |
Without the logs I can not help you. If you are having the exact same issue as @vipthuocno then it seems a jettifier problem, please check the sample project in the plugin and compare with your project |
my log is like this Launching lib/main.dart on Redmi Note 9 Pro in debug mode... FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
2: Task failed with an exception.
BUILD FAILED in 16s |
Are you using gradle 8?, please as I recommend above, try the sample project and compare the android configuration with the ones you are using in your project. |
Hi, I'm also facing this issue. I've upgraded to Gradle 8.3. But still keep getting this issue. I can't really compare the android project since mine has been migrated of the implicit declaration. I've added the main build files below and they do seem to line up with the example, at least as far i can see gradle.properties:
build.gradle: allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
} plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
id "com.google.firebase.crashlytics"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
if (project.android.hasProperty("namespace")) {
namespace 'com.vshtech.wms'
}
// ----- BEGIN flavorDimensions (autogenerated by flutter_flavorizr) -----
flavorDimensions "flavor-type"
productFlavors {
DEV {
dimension "flavor-type"
applicationId "com.vshtech.wms.uat"
resValue "string", "app_name", "Warehousing UAT"
}
PROD {
dimension "flavor-type"
applicationId "com.vshtech.wms"
resValue "string", "app_name", "Warehousing"
}
}
// ----- END flavorDimensions (autogenerated by flutter_flavorizr) -----
ndkVersion "25.1.8937393"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/*'
exclude("META-INF/*.kotlin_module")
}
compileSdkVersion 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.vshtech.wms"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0"
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
}
EDIT: After further investigation, it seems to me that |
What went wrong:
Execution failed for task ':app:checkDevelopmentDebugDuplicateClasses'.
can you give me the solution?
Thanks
The text was updated successfully, but these errors were encountered: