Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. Flutter - android

I am trying to debug my Flutter application on Pixel 1 and getting this error:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
I've read up on it and have implemented the suggested changes such as adding:
multiDexEnabled true to defaultConfig.
Any thoughts on how to go about debugging this?

Resolved by downgrading cloud_firestore dependency in pubspec.yaml to ^0.7.0

Related

Flutter - android - Execution failed for task ':app:checkDebugDuplicateClasses'

I am not able to use
flutter_html: ^2.2.1
and
audio_manager: ^0.8.2
in one project.
It shows error
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.exoplayer2.ui.package-info found in modules jetified-exoplayer-common-2.14.1-runtime (com.google.android.exoplayer:exoplayer-common:2.14.1) and jetified-exoplayer-ui-2.11.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.11.1)
Go to the documentation to learn how to Fix dependency resolution errors.
Clean the project: flutter clean
Upgrade dependencies: flutter pub upgrade --major-versions
Run the app. Let me know if you still had problem using those packages.
Update:
this seems to be a problem with audio_manager. try using audio_service: ^0.18.3 instead. audio_service
You need to override the version of exoplayer in the grade file

Facing issue once i run my react-native app on android

Once i try to run my react native app on android then it shows me an following error
i can run run the command : react-native run-android
Task :app:transformDexArchiveWithDexMergerForDebug FAILED
Any one solve my problem i will be very thankfull to you
Please check out this it might resolve yourExecution failed for task ':app:transformDexArchiveWithDexMergerForDebug'
precisely you just need to add this in android/app/build.gradle
defaultConfig{
.......
multiDexEnabled true
}
}

Execution failed for task ':google_sign_in:verifyReleaseResources'

Ok so I have been building my flutter application , however, i can't figure you what to do in case of this error. I have been following this blog https://flutter.dev/docs/deployment/android , for the release build of my app .Everything worked fine , until i added
flutter build apk --split-per-abi
It gave me the following error,
FAILURE:
Build failed with an exception. '
Execution failed for task ':google_sign_in:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/shuvayan/Desktop/test/srijan2020-app/build/google_sign_in/intermediates/res/merged/release/values/values.xml:276:
error: resource android:attr/fontVariationSettings not found.
/Users/shuvayan/Desktop/test/srijan2020-app/build/google_sign_in/intermediates/res/merged/release/values/values.xml:277: error: resource android:attr/ttcIndex not found.
error: failed linking references.
I had the facebook_flutter_plugin and google_sign_in plugins installed for my application.
After some google search a github issue pointed me to add in the android/app/build.gradle to force use compileSDKVersion 27 even it was given 28.
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
However, this didn't solve my issue and my the error's still showing up. I would appreciate a little help on this matter.
The problem lies with the plugin with it's specified dependency of compileSdkVersion which have been set to Android 27
update to the most recent version of the plugin, as of now 4.2.0
References:
https://pub.dev/packages/google_sign_in#-changelog-tab-
https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in/android/build.gradle
https://github.com/flutter/flutter/issues/32595

Execution failed for task ':react-native-youtube:verifyReleaseResources'

While making build of react native app I get the following error.
* What went wrong:
Execution failed for task ':react-native-youtube:verifyReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
And after this the build is failed.Why this came and what is the possible solution for this problem?
Reason for the error:
You have installed react-native-youtube as a dependency, And the reason for this error is that the configurations of your android/app/build.gradle and node_modules/react-native-youtube/android/build.gradle mismatch.
Solution
Navigate to node_modules/react-native-youtube/android/build.gradle
Edit and keep the compileSdkVersion buildToolsVersion minSdkVersion
targetSdkVersion same as you have in android/app/build.gradle
Sync the project again.
Run ./gradlew assembleRelease from the terminal.
Edit your node_modules/react-native-youtube/android/build.gradle file like this:
https://github.com/hwjfordev/react-native-youtube/commit/606401aa236e94394736fcc43ce9a4e29bf6a129

Error:Execution failed for task .DexArchiveMergerException: Unable to merge dex

I am getting error Unable to merge dex
that’s my gradle
I have already done following
clean and rebuild
Invalidate and restart
multiDexEnabled true
implementation ‘com.android.support:multidex:1.0.1’
Delete .gradle folder and restart android studio
Still problem is not resolved I am stuck from 2 days please help
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Android has recently updates their libraries into 27.1.0,So simply change your dependencies.
Also add this in app/build.gradle:
android {
defaultConfig {
multiDexEnabled true
}
}

Categories

Resources