I upgraded to the latest Flutter version.
Afterwards it started giving the error...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:
/myAppPath/android/app/src/main/AndroidManifest.xml uses `android:name="io.flutter.app.FutterApplication"`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
I then went to the migration guide and implemented the required changes which were changing the first line to the second
-android:name="io.flutter.app.FlutterApplication"
+android:name="#{applicationName}"
Now I get the error...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/pathToMyApp/android/app/src/main/AndroidManifest.xml:8:5-51:19: AAPT: error: attribute 'android:name' in <application> tag must be a valid Java class name.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 41s
Running Gradle task 'assembleRelease'... 41.9s
Gradle task assembleRelease failed with exit code 1
Do this
android:name="${applicationName}"
instead of
android:name="#{applicationName}"
I added this code to my flutter pubspec.yaml file
plain_notification_token:
git:
url: https://github.com/zionnite/plain_notification_token.git
but whenever I run the app on my android I encounter an error
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
/Users/apple/.pub-cache/git/plain_notification_token-3709a43167c63bd8f22570afe4fb21fe2e982c39/android/src/main/java/net/kikuchy/plain_notification_token/PlainNotificationTokenPlugin.java:77: error: local variable result is accessed from within inner class; needs to be declared final
result.success(null);
^
/Users/apple/.pub-cache/git/plain_notification_token-3709a43167c63bd8f22570afe4fb21fe2e982c39/android/src/main/java/net/kikuchy/plain_notification_token/PlainNotificationTokenPlugin.java:81: error: local variable result is accessed from within inner class; needs to be declared final
result.success(task.getResult().getToken());
^
Note: /Users/apple/.pub-cache/git/plain_notification_token-3709a43167c63bd8f22570afe4fb21fe2e982c39/android/src/main/java/net/kikuchy/plain_notification_token/PlainNotificationTokenPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':plain_notification_token:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 41s
Exception: Gradle task assembleDebug failed with exit code 1
please how do i resolve this?
The original package was updated recently, perhaps try the official one from pub.dev - https://pub.dev/packages/plain_notification_token, instead of the forked one from GitHub.
plain_notification_token: 0.0.4
I get this error when i add "cloud_firestore:" to pubspec.yaml :
$ flutter run
Launching lib/main.dart on Infinix X627 in debug mode...
Initializing gradle... 1.6s
Resolving dependencies... 5.4s
Note: /home/muhammad/development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/muhammad/development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 80689 > 65536)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/0.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/1.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/4.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/5.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/6.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/7.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/8.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/9.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/10.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/11.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/12.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/13.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/14.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/15.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/16.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/17.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/18.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/19.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/20.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/21.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/22.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/23.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/24.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/25.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/26.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/27.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/28.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/29.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/30.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/31.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/32.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/33.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/34.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/35.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/36.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/37.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/38.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/39.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/40.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/41.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/42.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/43.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/44.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/45.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/46.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/47.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/48.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/49.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/50.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/51.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/52.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/53.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/54.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/55.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/56.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/57.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/58.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/59.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/60.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/62.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/63.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/64.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/65.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/66.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/67.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/68.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/69.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/72.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/73.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/74.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/75.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/76.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/77.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/78.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/79.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/80.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/81.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/82.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/83.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/84.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/85.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/86.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/87.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/88.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/89.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/90.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/91.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/92.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/93.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/94.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/95.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/96.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/97.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/98.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/99.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/100.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/101.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/102.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/103.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/104.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/105.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/107.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/108.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/109.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/110.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/111.jar
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 36s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 96.8s
Gradle task assembleDebug failed with exit code 1
(I'm new to flutter and android development)
Since cloud_firestore is a decently sized dependency, you need to enable multidex.
View this to configure your app to support multidex.
If you don't want to do that, all you have to do is set your minSdkVersion to 21 or higher in your build.gradle. However, that does make it so that your app doesn't support devices below 5.1.
Depending on how many users you want to support, I'd recommend just upgrading your minSdkVersion since it's the easiest way. It's up to you however.
I am developing a flutter app.
I found a sample flutter project so folk it.
But the project... build failed with below log message.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath. You should manually set the same version via DependencyResolution
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
The project is not special.
The android part, there are no other modifications.
It is totally same with the "new flutter project'.
I tried something:
Migration to AndroidX
This is failed with error popup. I tried to migration using "refactor > migration to android x", but it shows error popup.
The error popup said to me use compilesdkversion at least 28.
But I already use 28.. what should I do?......
change gradle version from 3.2.1 to 3.3.2.
But build failed with different log
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel
I don't know what should i do...
It make me to tired...
I just want to coding...
I resolve this issue following this link: https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
There is 2 migration guide.
Recommended
Not Recommended
In my case, 'Recommended' solution doesn't work...
But, 'Not recommended' solution works...
...
It's not easy...
I tried this two lines of code
flutter clean and then
flutter run
I upgraded flutter today (flutter update) and the packages (flutter packages update) and since my app does not build.
This is the output I get (after trying to change the sdk from 27 to 28 and clean)
I would appreciate your help.
Launching lib\main.dart on in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
*********************************************************
WARNING: This version of device_info will break your Android build if it or its dependencies aren't compatible with AndroidX.
See hfor more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\271.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\272.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\273.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\274.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\275.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\276.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\277.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\278.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\279.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\280.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\281.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\282.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\283.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\284.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\285.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\286.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\287.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\288.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\289.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\290.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\291.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\292.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\293.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\294.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\295.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\296.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\297.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\298.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\299.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\300.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\301.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\302.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\303.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\304.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\305.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\306.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\307.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\308.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\309.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\310.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\311.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\312.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\313.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\314.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\315.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\316.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\317.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\318.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\319.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\320.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\321.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\322.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\323.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\324.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\325.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\326.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\327.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\328.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\329.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\330.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\331.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\332.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\333.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\334.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\335.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\336.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\337.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\338.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\339.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\340.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\341.jar, C:\Users\X\Documents\Projects\git\XX\app\build\app\intermediates\transforms\dexBuilder\debug\342.jar
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 37s
Finished with error: Gradle task assembleDebug failed with exit code 1
Original answer by Yuri Misyac
Enable multidex.
Open {your flutter project}/android/app/build.gradle and add following lines.
defaultConfig {
...
multiDexEnabled true // Add this line
}
and
dependencies {
...
implementation 'com.android.support:multidex:1.0.3' // Add this line
}
Migrate to AndroidX.
Open {your flutter project}/android/gradle.properties and add following lines.
...
android.useAndroidX=true // Add this line
android.enableJetifier=true //Add this line
More info:
Original answer (Check this if it still doesn't work)
Enable Multidex
Migrating to AndroidX