Skip to content

Commit 635cd78

Browse files
authored
fix(core, android): fix a null issue when initializing fromResource() (#12404)
* fix(core, android): fix a null issue when initializing from ressources * fix(core, android): fix a null issue when initializing from ressources
1 parent 15d8a1c commit 635cd78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ public void optionsFromResource(
204204
try {
205205
final FirebaseOptions options = FirebaseOptions.fromResource(applicationContext);
206206
if (options == null) {
207-
taskCompletionSource.setResult(null);
207+
taskCompletionSource.setException(
208+
new Exception(
209+
"Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly."));
208210
return;
209211
}
210212
taskCompletionSource.setResult(firebaseOptionsToMap(options));

0 commit comments

Comments
 (0)