-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: development android crash on reinstall (#1773)
- Loading branch information
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,8 @@ | |
}, | ||
"patchedDependencies": { | ||
"@capacitor/haptics": "patches/@[email protected]", | ||
"@capacitor/keyboard": "patches/@[email protected]" | ||
"@capacitor/keyboard": "patches/@[email protected]", | ||
"@capacitor/android": "patches/@capacitor__android.patch" | ||
}, | ||
"updateConfig": { | ||
"ignoreDependencies": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/capacitor/src/main/java/com/getcapacitor/Bridge.java b/capacitor/src/main/java/com/getcapacitor/Bridge.java | ||
index 594146a0f8fc2903fd255c0b864db97d94ebfb1b..4f13ca78a4051e3b1bc5cd5d3de0e8a99aa44728 100644 | ||
--- a/capacitor/src/main/java/com/getcapacitor/Bridge.java | ||
+++ b/capacitor/src/main/java/com/getcapacitor/Bridge.java | ||
@@ -417,7 +417,7 @@ public class Bridge { | ||
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); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.