-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Firebase For Flutter Execution failed for task ':app:transformClassesWithDexForDebug'. #23131
Comments
What version of |
@hnvn all of the Firebase related-plugins which I'm using are not specifying a version |
Can you show your |
|
why do you leave the version number of dependence empty? |
So I can stay with the latest version - normally works but not sure what leads to this issue. |
so you should try to give those dependencies its version number. I am using the latest version of firebase plugin. Here's my working configuration:
|
Thought that it would work but it didn't. Got any other ideas? |
Can you reproduce when you copy your |
I'm facing same issue with 0.0.6+1. |
I'll get to it in a moment. As an addition I've searched a bit and ended up opening the android module in android studio, I got the following message: This is my dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true Here's the android level: buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
} Currently using the cupertino_icons: ^0.1.2
cloud_firestore: ^0.8.1+1
firebase_core: ^0.2.5+1
firebase_auth: ^0.6.2+1
google_sign_in: ^3.2.1
firebase_admob: ^0.6.1+1
shared_preferences: ^0.4.3
flutter_map: ^0.1.4
#outline_material_icons: ^0.1.0
geolocator: ^2.1.0
rounded_modal: ^1.0.0
flutter_launcher_icons: ^0.6.1
Yeah, I think I'll be doing that if I won't be able to figure this out.
Tried it - didn't work thanks for the try though! |
try this: lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
} |
@hnvn If you are referring to the def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "example"
minSdkVersion 16
targetSdkVersion 28
versionCode 2
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true As a plus, I've noticed changes in Firebase's |
I'm getting the same issue with the following Flutter packages and versions:
Reverting dependencies:
flutter:
sdk: flutter
firebase_auth: ^0.6.2+1
google_sign_in: ^3.2.1
cloud_firestore: ^0.7.4
cloud_functions: ^0.0.4+1
firebase_messaging: ^2.0.1
firebase_ml_vision: ^0.1.2
flutter_launcher_icons: ^0.6.1 |
You're a life-saver! Conclusion - I think that the new UPDATE: Had multiple issues including Admob, Firebase and dependencies versions - closing this, for now - many thanks to @ened for all of the help you've provided! |
This worked for me! Thanks |
Thank you TheAppchemist, I have revert cloud_firestore version it works ! |
Same issue with version 0.9.0, on iOS all packages works great without any problem with android I need the version 0.7.4. |
Flutter team, any word on how to support these 2 plugins? I'd like to use Firestore |
@DonsWayo @stevenspiel this issue is closed since a while. I'd suggest to ask on StackOverflow or similar. |
I had to revert as well. I tried all of the newest, here was my pubspec.yaml:
I received the following 9 Errors:
I then reverted to the following pubspec.yaml dependencies and was able to get it to work:
|
I'm running into this issue as well. When I downgrade to Oy. Can anyone advise how I might be able to accomplish this with the downgraded cloud_firestore version?
|
Getting the same error name: signatureviewnew
description: A new Flutter project.
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
image_picker_saver: ^0.1.0
fluttertoast: ^2.0.0
firebase_storage: ^1.0.4
esys_flutter_share: ^0.0.9
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/eraser.png
- assets/screenshot.png
- assets/angry.png`
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
//solving error
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.0"
}
}
}
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.signatureviewnew"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:multidex:1.0.3'
// firebase
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'` |
I'm also met this error and after few days of researches I've found a solution. not "downgrade your plugin version" solution. real one.
this steps helped me to overcome this error and compile app w\o errors |
if you got an runtime error after doing these steps. check this and add the missing steps |
works for me: add multiDexEnabled true below targetsdkversion, look like this: in Dependancy add this line implementation 'com.android.support:multidex:1.0.3' Done. |
Just find the latest package installation (which you get this error after install it) and remove it. now trying to running the app, if successful, please trying to installing another version of the installed package. |
Hey All, Hopefully, this will help others and you won't have to revert to older versions of firebase packages! |
Thanks Marvioso, |
I'm having this issue too. It all started when I upgraded google_sign_in from 4.0.7 to 4.0.14. All these solutions are stuff that's already set, except for downgrading packages. I can't seem to downgrade to 4.0.7. The section where the dart packages are listed still shows 4.0.14. Tried deleting that, doing a flutter clean, removing the package from pubspec yml, invalidating cache, but when I do packages get again, 4.0.14 shows back up. Any ideas? |
Quick note: the best fix I found for this was this one: (on mac at least) |
are you using firebase messaging? |
@budescode This worked for me as well |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Everything has been working just fine until a couple of minutes ago when suddenly I got the following:
Flutter Doctor
Here's my
flutter doctor -v
:Logs
When I run the app using
flutter run -v
this is my output:Note
This is a reopen of #11113
I've had this issue before, last time I managed to fix it by adding to build.gradle (android app level)
multiDexEnabled true
- This time it didn't work.Any clues?
The text was updated successfully, but these errors were encountered: