New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [cloud_firestore] Firestore crashes in release build of Flutter Android app. #7406
Comments
Hi @deZak, Thanks for filing the issue. Can you please share what version of the
Please share your On a side note
cloud_firestore: ^3.1.0
firebase_core: ^1.10.0 and I was able to generate a release apk. |
Hi @maheshmnj , thanks for responding.
Additional info, dependencies in
|
@deZak can you please share the complete output of Thanks |
Hey @deZak. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Hello i also have the same issue.......in release mode firestore not working |
project level build.gradle/ buildscript {
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.google.gms:google-services:4.3.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
} app level build.gradle/ 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 GradleException("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 plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 31
buildToolsVersion "30.0.2"
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.roccabox.roccabox"
minSdkVersion 23
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:28.4.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
} pubsec.yaml file/ environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_svg: ^0.22.0
carousel_slider: ^4.0.0
http: ^0.13.3
shared_preferences: ^2.0.5
email_validator: ^2.0.1
image_picker: ^0.8.0+3
country_code_picker: ^2.0.2
cached_network_image: ^3.1.0
flutter_launcher_icons: ^0.9.0
readmore: ^2.1.0
photo_view: ^0.12.0
cloud_firestore: ^3.1.1
firebase_messaging:
firebase_core: ^1.10.2
flutter_local_notifications: ^9.1.4
firebase_storage:
cloud_functions: ^3.2.0
firebase_auth: ^3.3.0
video_player: ^2.2.5
url_launcher: ^6.0.12
file_picker: ^4.1.3
flutter_pdfview: ^1.2.1
path_provider:
permission_handler:
provider: ^6.0.1
agora_rtc_engine: ^4.0.7
flutter_ringtone_player: ^3.0.0
rxdart: ^0.26.0
audioplayers: ^0.20.1
uuid: ^3.0.5
multi_image_picker: ^4.7.14
dev_dependencies:
flutter_test:
sdk: flutter
flutter_native_splash: ^1.1.8+4
flutter_icons:
android: "launcher_icon"
ios: true
image_path: assets/logo.png
image_path_ios: assets/app_icon_ios.jpg
flutter_native_splash:
color: "#FFFFFF"
image: assets/logo.png
color_dark: "#1a1a1a"
android: true
ios: true
flutter:
uses-material-design: true
assets:
- assets/
fonts:
- family: Poppins
fonts:
- asset: font/Poppins-Regular.ttf
- asset: font/Poppins-SemiBold.ttf
weight: 500
- asset: font/Poppins-Light.ttf
weight: 300 |
@Sagarsappic, please share
Thanks |
I had a same Issue |
Hey @deZak. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Is this issue resolved? |
Yes it resolved. you have to go to this link |
Thank you! It worked! |
Thanks for letting us know, @Sagarsappic 👍 |
Firestore crashes release build of Flutter app in Android. After going through this post in Stackoverflow (https://stackoverflow.com/questions/69094856/flutter-firestore-unavailable-error-on-release-mode-with-minifyenabled), tried three different configurations in buildTypes.release in android/app/build.gradle file.
Case 1:
In builTypes.release:
In proguard-rules.pro file:
-keep class com.example.appname.** { *; }
Created appbundle by running:
After releasing for Internal Testing in Google Play, app crashes on accessing Firestore. Crash report:
Case 2:
Tried to build appbundle again changing buildType.release to (proguard rules same as above):
This time, Gradle failed to build appbundle. Log from terminal is:
Case 3:
buildTypes.release configuration is (no change in proguard rules):
However, in this case built appbundle by running:
After releasing for Internal Testing in Google Play, app crashes on accessing Firestore. Crash report:
Run
flutter doctor
and paste the output below:Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19042.1348], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.62.3)
[√] Connected device (2 available)
• No issues found!
The text was updated successfully, but these errors were encountered: