From b0fc98d0e6532e9ec9aaaef7f6e3c1b3c7d89d6d Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Tue, 24 Jul 2018 17:10:38 +0200 Subject: [PATCH] log error when resource not found --- android/src/main/java/io/invertase/firebase/Utils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/io/invertase/firebase/Utils.java b/android/src/main/java/io/invertase/firebase/Utils.java index 293f0f7c..444f6162 100644 --- a/android/src/main/java/io/invertase/firebase/Utils.java +++ b/android/src/main/java/io/invertase/firebase/Utils.java @@ -158,6 +158,10 @@ public class Utils { } public static int getResId(Context ctx, String resName) { - return ctx.getResources().getIdentifier(resName, "string", ctx.getPackageName()); + int resourceId = ctx.getResources().getIdentifier(resName, "string", ctx.getPackageName()); + if (resourceId == 0) { + Log.e(TAG, "resource " + resName + "could not be found"); + } + return resourceId; } }