Android / IOS fluter 응용 프로그램에서
auth, firestore firebase를 사용하려는데 빌드 로그에 여러 메시지가 표시됐다.
example)
Note: D:\Flutter\SDK\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.4.3+1\android\src\main\java\io\flutter\plugins\firebase\core\FirebaseCorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: D:\Flutter\SDK\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.13.0+1\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: 81454 > 65536) com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 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 at
[Solution]
You need to use the following plugin:dependencies: firebase_auth: ^0.15.3 cloud_firestore: ^0.13.0+1
Don't forget to configure firebase:
https://pub.dev/packages/cloud_firestore#setup
https://pub.dev/packages/firebase_auth#usage
Also in your app/build.gradle, increase the minSdkVersion:
Change this:
minSdkVersion 16
into this:
minSdkVersion 23
'Language > Java, Android' 카테고리의 다른 글
[flutter] Vertical viewport was given unbounded height (0) | 2021.09.13 |
---|---|
[Flutter] 스플래시 스크린 (1) | 2021.08.15 |
안드로이드 플러터 오류 / Cannot run with sound null safety because dependencies don't support null safety TIL # 36 (0) | 2021.08.01 |
Flutter Firebase 연동하기(ios, android) (0) | 2021.08.01 |
Android Cannot fit requested classes in a single dex file. (0) | 2021.08.01 |