diff --git a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java index dd623ae65..868253537 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java @@ -416,7 +416,7 @@ private boolean isNewBinary() { PackageManager pm = getContext().getPackageManager(); PackageInfo pInfo = InternalUtils.getPackageInfo(pm, getContext().getPackageName()); versionCode = Integer.toString((int) PackageInfoCompat.getLongVersionCode(pInfo)); - versionName = pInfo.versionName; + if (pInfo.versionName != null) versionName = pInfo.versionName; } catch (Exception ex) { Logger.error("Unable to get package info", ex); }