Flutter error when adding "cloud_firestore" - android

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.

Related

Execution failed for task ':expo:compileReleaseKotlin'

I am building a react native app using eas. Its failing each time i try and i have no idea what could be the issue. `this is the error its showing
Task :expo:compileReleaseKotlin FAILED1470
[stderr] e: /home/expo/workingdir/build/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt: (50, 3): 'getUIImplementationProvider' overrides nothing1471
[stderr] e: /home/expo/workingdir/build/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt: (50, 76): Unresolved reference: UIImplementationProvider1472
[stderr] e: /home/expo/workingdir/build/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt: (51, 12): Not enough information to infer type variable T1473>
Task :expo-modules-core:buildCMakeRelWithDebInfo[x86_64]1474w:
Detected multiple Kotlin daemon sessions at build/kotlin/sessions1475Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.1476You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.1477See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings1478Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.1479Please consult deprecation warnings for more details.1480377 actionable tasks: 377 executed1481
[stderr] FAILURE: Build failed with an exception.1482
[stderr] * What went wrong:1483[stderr] Execution failed for task ':expo:compileReleaseKotlin'.1484[stderr] > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction1485[stderr] > Compilation error. See log for more details1486
[stderr] * Try:1487[stderr] > Run with --stacktrace option to get the stack trace.1488[stderr] > Run with --info or --debug option to get more log output.1489[stderr] > Run with --scan to get full insights.1490[stderr] * Get more help at https://help.gradle.org1491[stderr] BUILD FAILED in 5m 47s1492Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
i have tried un installing and reinstalling expo cli on machine which is using linux(Crostini to be precise) because some of the errors it was highlighting were deprecation errors of some of the installed modules. ive tried building it a number of times, revisiting my code and searching online hoping that i may i be able to pin point where its going wrong
The solution that worked for me is to upgrade your react native package to the patch version as described here: https://github.com/facebook/react-native/issues/35210

plain_notification_token failed to Compile in Flutter

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

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex in ionic 5

everyone, please help me. im running ionic cordova run android. then an error occured. before install plugin facebook4 things are going well, after instal the plugin im can not build or run android. i have running cordova clean and cordova build not solved my problem.
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
42 actionable tasks: 40 executed, 2 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 49s
cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: E:\PROJECT\spectraapp\platforms\android\app\src\main\java\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 49s
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --device exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Try removing platform and re-add it.
ionic cordova platform remove android
ionic cordova platform add android
then try
ionic cordova run android
If still have some issue
check it
solved. iam remove plugin facebook and add again with version #1.7.4
ionic cordova plugin add cordova-plugin-facebook4#1.7.4 --variable APP_ID="appid" --variable APP_NAME="appname"
add resource strings.xml in platforms/android/app/src/main/res/values/strings.xml
<string name="fb_app_id">appid</string>
<string name="fb_app_name">appname</string>
ionic cordova run android

Version solving failed for flutter_oauth because of SDK

I'm trying to use this dependency but get an error when I run:
flutter packages get
after adding the dependency
dependencies:
flutter:
sdk: flutter
flutter_oauth: "^0.0.1"
The error:
The current Dart SDK version is 2.3.0-dev.0.5.flutter-a1668566e5.
Because flutter_app depends on flutter_oauth any which requires SDK version >=1.8.0 <2.0.0, version solving failed.
pub get failed (1)
exit code 1
I have a feeling I need to change some environment settings but I'm not too sure how to do that:
environment:
sdk: ">=2.1.0 <3.0.0"
Update: I used the new dependency as suggested: flutter_generic_oauth: ^1.0.2 and received this error when i ran the app on android studio's simulator:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.3.5\android\src\main\java\com\flutter_webview_plugin\WebviewManager.java uses 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: D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\6.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\7.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\8.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\9.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\10.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\11.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\12.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\13.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\14.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\15.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\16.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\17.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\18.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\19.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\20.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\21.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\22.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\23.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\24.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\25.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\26.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\27.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\28.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\29.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\30.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\31.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\32.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\33.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\34.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\35.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\36.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\37.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\38.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\39.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\40.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\41.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\42.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\43.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\44.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\45.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\46.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\47.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\48.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\49.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\50.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\51.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\52.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\53.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\54.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\55.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\56.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\57.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\58.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\59.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\60.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\61.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\62.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\63.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\64.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\65.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\66.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\68.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\69.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\70.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\72.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\73.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\74.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\75.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\76.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\77.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\78.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\79.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\80.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\81.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\82.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\83.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\84.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\85.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\86.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\87.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\88.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\89.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\90.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\91.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\92.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\93.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\94.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\95.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\96.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\97.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\98.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\99.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\100.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\101.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\102.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\103.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\104.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\105.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\106.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\107.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\108.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\109.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\110.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\111.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\112.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\113.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\114.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\115.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\116.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\117.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\118.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\119.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\120.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\121.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\122.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\123.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\124.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\125.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\126.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\127.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\128.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\129.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\130.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\131.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\132.jar
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
* 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 17s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
That package hasn't been updated to Dart 2.0. Use flutter_generic_oauth instead.
You will need to convert your project to AndroidX.

Flutter build failed with D8: Program type already present

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

Categories

Resources