cloud_firestore: ^0.8.0flutter runregisterResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
And also
Note: /Users/filiph/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/filiph/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
(And also this, but it's covered by https://github.com/flutter/flutter/issues/18159)
W/Firestore( 5687): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
W/Firestore( 5687): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
W/Firestore( 5687):
W/Firestore( 5687): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
W/Firestore( 5687): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
W/Firestore( 5687): .setTimestampsInSnapshotsEnabled(true)
W/Firestore( 5687): .build();
W/Firestore( 5687): firestore.setFirestoreSettings(settings);
W/Firestore( 5687):
W/Firestore( 5687): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date objects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
W/Firestore( 5687):
W/Firestore( 5687): // Old:
W/Firestore( 5687): java.util.Date date = snapshot.getDate("created_at");
W/Firestore( 5687): // New:
W/Firestore( 5687): Timestamp timestamp = snapshot.getTimestamp("created_at");
W/Firestore( 5687): java.util.Date date = timestamp.toDate();
W/Firestore( 5687):
W/Firestore( 5687): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behavior, so if you do not follow these steps, YOUR APP MAY BREAK.
cc @kroikie @bparrishMines
I'm not sure where to add this, but I'm having the same issue.
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+4/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 123.8s (!)
Me too :(
Same issue with cloud_firestore: ^0.13.0+1. Not sure why this issue is closed.
Note: C:\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.
Still Facing this issue with cloud_firestore: ^0.13.0+1.
BUILD FAILED in 58s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Finished with error: The plugin cloud_firestore could not be built due to the issue above.
Same here
Problem persists on cloud_firestore: ^0.13.4
Me too, is there any update for this issue?
set: multiDexEnabled true solved for me.
project/android/app/build.gradle:
```
defaultConfig {
......
multiDexEnabled true
}
```
Problem persists on cloud_firestore-0.13.4+2
Persists on cloud_firestore: 0.13.5
flutter: ^1.12.13
multiDexEnabled true does not solve the problem for me.
Persists on cloud_firestore: ^0.13.5.
Also, why is this Closed when it's not been solved yet???
Same issue here,
Note: C:\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.13.5\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
same issue happens with me
Note: C:\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.13.5\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
same here, this annoying bug seems already here ages. tried anything I can find to solve it, but Nooooooooo....
Same problem with cloud_firestore: ^0.13.5
I have the same problem. I can create my app release apk but this doesn't work with Firebase.
I have cloud_firestore: ^0.13.5
Note: /Users/erwinvasquezpinto/Programacion/Flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Removed unused resources: Binary resource data reduced from 338KB to 315KB: Removed 6%
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 75,2s
✓ Built build/app/outputs/apk/release/app-release.apk (21.0MB).
Doesn't work with Firebase.
I have cloud_firestore: ^0.13.5
Note: /Users/tungsten/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.5/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/tungsten/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java uses or overrides 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.
This error went away after flutter pub upgrade in my case.
same issue
This error went away after
flutter pub upgradein my case.
@ruslanvs Thanks a lot 'pub upgrade' worked for me too.
same issue with flutter 1.17.0
cloud_firestore: 0.13.5
This worked for me:
Change the minimum target SDK version:
Open android/app/build.gradle, then find the line that says minSdkVersion 16. Change that line to minSdkVersion 21. Save the file.
I have thots values:
defaultConfig {
applicationId "xxx"
minSdkVersion 21
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
and this:
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.4.0'
implementation 'com.google.firebase:firebase-core:17.4.0'
implementation 'com.google.firebase:firebase-firestore:21.4.3'
implementation 'com.google.firebase:firebase-database:19.3.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'
}
and doesn't work
set: multiDexEnabled true solved for me.
project/android/app/build.gradle:
defaultConfig { ...... multiDexEnabled true }
persists on cloud_firestore: ^0.13.5
mutliDexEnable trueworked for me
what is the solution?
i tried flutter clean and flutter upgrade and add mutliDexEnable true and upminSdkVersion to 21
but Still Facing this issue with cloud_firestore: ^0.13.5
java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
Reopened the issue due to lots of messages still commenting that the issue persists even after trying solution
still happen in cloud_firestore: ^0.13.5
Launching lib\main.dart on vivo 1724 in debug mode...
Parameter format not correct -
Note: C:\Users\Arif Ikhsanudin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.13.5\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I solved by flutter pub upgrade and then flutter run.
My problem went away.
I tried to update to latest gradle but it did not work. Also tried several approaches suggested in other comments, like those by running flutter in terminal. I just had to wait for the process to finish and ignore the messages for now, because the main issue was that the apk that was not being built or installed to the Android VM.
I ended by:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "co.appbrewery.flash_chat"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'androidx.multidex:multidex:2.0.0'
}
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
C:\Users\junior\StudioProjects\flash-chat-flutter\android\app>flutter run
Changing current working directory to: C:\Users\junior\StudioProjects\flash-chat-flutter
Using hardware rendering with device Android SDK built for x86 64. If you get graphics artifacts,
consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 64 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.3.4\android\src\main\java\io\flu
tter\plugins\firebase\core\FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.13+1\android\src\main\java\i
o\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses or overrides a deprecated A
PI.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.13+1\android\src\main\java\i
o\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operati
ons.
Note: Recompile with -Xlint:unchecked for details.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 111.7s
√ Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk... 1.4s
Flutter is taking longer than expected to report its views. Still trying...
I/FA ( 9886): Tag Manager is not found and thus will not be used
W/wery.flash_cha( 9886): Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;-
>getSourceNodeId()J (greylist, reflection, allowed)
W/wery.flash_cha( 9886): Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->g
etSourceNodeId()J (greylist, reflection, allowed)
W/wery.flash_cha( 9886): Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->
mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
W/wery.flash_cha( 9886): Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflec
tion, allowed)
D/HostConnection( 9886): HostConnection::get() New Host Connection established 0x7e3c252a1ac0, tid 9
919
D/HostConnection( 9886): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDRO
ID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420
_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_
texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
W/OpenGLRenderer( 9886): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without.
..
D/eglCodecCommon( 9886): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 9886): eglCreateContext: 0x7e3c252a1b60: maj 2 min 0 rcv 2
D/EGL_emulation( 9886): eglMakeCurrent: 0x7e3c252a1b60: ver 2 0 (tinfo 0x7e3c252ef180)
D/HostConnection( 9886): HostConnection::get() New Host Connection established 0x7e3cb49f8a20, tid 9
929
D/HostConnection( 9886): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDRO
ID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420
_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_
texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
D/eglCodecCommon( 9886): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 9886): eglCreateContext: 0x7e3cb49f8ac0: maj 2 min 0 rcv 2
W/Gralloc3( 9886): mapper 3.x is not supported
D/HostConnection( 9886): createUnique: call
D/HostConnection( 9886): createUnique: call
D/HostConnection( 9886): HostConnection::get() New Host Connection established 0x7e3cb49f8b60, tid 9
929
D/HostConnection( 9886): HostConnection::get() New Host Connection established 0x7e3c252a1ca0, tid 9
919
D/HostConnection( 9886): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDRO
ID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420
_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_
texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
D/eglCodecCommon( 9886): allocate: Ask for block of size 0x1000
D/eglCodecCommon( 9886): allocate: ioctl allocate returned offset 0x3ff807000 size 0x2000
D/HostConnection( 9886): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDRO
ID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420
_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_
texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 9886): eglMakeCurrent: 0x7e3cb49f8ac0: ver 2 0 (tinfo 0x7e3bd9e2c940)
D/EGL_emulation( 9886): eglMakeCurrent: 0x7e3c252a1b60: ver 2 0 (tinfo 0x7e3c252ef180)
D/eglCodecCommon( 9886): setVertexArrayObject: set vao to 0 (0) 1 0
I/Choreographer( 9886): Skipped 31 frames! The application may be doing too much work on its main t
hread.
E/EnhancedIntentService( 9886): binding to the service failed
Syncing files to device Android SDK built for x86 64... 771ms
Flutter run key commands.
r Hot reload.
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on Android SDK built for x86 64 is available at:
http://127.0.0.1:59875/OhgHM81QRC8=/
D/EGL_emulation( 9886): eglMakeCurrent: 0x7e3cb49f8ac0: ver 2 0 (tinfo 0x7e3bd9e2c940)
I solved by
flutter pub upgradeand thenflutter run.My problem went away.
flutter pub upgrade fixed this issue for me also
set multiDexEnabled true solved the problem for me.
I changed the sdk minimum requirement,, from >=2.6.0 <3.0.0 to >=2.7.0 <3.0.0 and the error message is gone
As others have said 'flutter pub upgrade' fixed the issue for me. I'm not sure if that will work for everyone else's issue, but it certainly seems to be a solution for a lot of people.
Hey all, as part of our on-going work for #2582, this has been resolved in our Firebase Firestore rework (#2913) - which has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you
Hey all, as part of our on-going work for #2582, this has been resolved in our Firebase Firestore rework (#2913) - which has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you
Waiting for stable release
flutter Pub upgrade fixed this issue for me too. Thanks
This error went away after
flutter pub upgradein my case.
Thank you, this method fixed my issue.
Most helpful comment
set: multiDexEnabled true solved for me.
project/android/app/build.gradle:
```
defaultConfig {
......
multiDexEnabled true
}
```