mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
log error when resource not found
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user