[解決] D 8の原因となるファイヤーストアをフラッターします.単一のDEXファイルでリクエストされたクラスに適合できません.

8823 ワード

こんにちはみんな、あなたはすべてですか?この動画はお気に入りから削除されています.私はAndroid Studioの最新バージョンでフラッターアプリでFirestoreを使用しようとしている間、私はD 8に直面しています:私のスタックトラックでこのエラーは、単一のDEXファイル(Chrountメソッド:71610)65536)で要求されたクラスに適合することはできません.
したがって、ここでは、この記事は、G 8を引き起こしているフラッターFirestoreを解決するために、すべての解決策をGTOにします:一つのDEXファイルで要求されたクラスに適合することができません.あなたの時間を無駄にせずにこの記事を始めましょう.

エラーとは
私はAndroid Studioの最新バージョンでフラッターアプリを使用してFirestoreを使用しようとしている間、私は私の新しいアプリを実行するしようとすると、次のエラーを取得するまでのすべてのステップを完了した後(PubSpec更新).ヤル
これがスタックトラックです
D8: Cannot fit requested classes in a single dex file (# methods: 71610 > 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: C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\2.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\3.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\4.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\5.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\6.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\7.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\8.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\9.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\10.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\11.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\12.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\13.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\14.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\15.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\16.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\17.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\18.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\19.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\20.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\21.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\22.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\23.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\24.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\25.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\26.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\27.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\28.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\29.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\30.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\31.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\32.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\33.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\34.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\35.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\36.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\37.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\38.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\39.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\40.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\41.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\42.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\43.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\44.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\45.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\46.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\47.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\48.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\49.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\50.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\51.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\52.jar, C:\Users\DonBo\AndroidStudioProjects\don_flutter_projects\bakery\bakery\build\app\intermediates\transforms\dexBuilder\debug\53.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 21s
Finished with error: Gradle task assembleDebug failed with exit code 1
これが私のPubspecです.YAMLファイル
dependencies:

  cloud_firestore:

  flutter:
    sdk: flutter

解決策
ここにすべての可能なソリューションが追加されました[Solved] Flutter Firestore causing D8: Cannot fit requested classes in a single dex file (# methods: 71610 > 65536)
をご覧ください