Problem: Getting "App not installed" or "Installation conflict" when trying to install an updated APK?
Solution: All APK versions must use the same signing key.
-
For Release/Production APKs:
- Always build with:
npm run cap:build:android:release - Uses your keystore (
freq.jks) - same key every time ✅
- Always build with:
-
For Debug/Testing APKs:
- Either use release build above, OR
- Uninstall old version first:
adb uninstall com.frequencyzen.app
- Increment
versionCodeinandroid/app/build.gradle(current: 2) - Use same keystore for signing
- Build release APK
To allow users to update from older versions without conflicts, all APKs must be signed with the same signing key. This guide explains how to ensure smooth updates.
This happens when:
- Different signing keys: Old APK and new APK use different keys
- Unsigned debug builds: Debug builds use a temporary key that changes
- Package name mismatch: Different application IDs
-
Create or use existing keystore:
- Keystore file:
freq.jks(already exists in project root) - IMPORTANT: Keep this file safe and backed up!
- NEVER lose this file - you cannot update apps signed with a lost key
- Keystore file:
-
Create
key.propertiesfile in project root (if not exists):storeFile=../freq.jks storePassword=YOUR_KEYSTORE_PASSWORD keyAlias=YOUR_KEY_ALIAS keyPassword=YOUR_KEY_PASSWORD
-
Build release APK:
npm run cap:build:android:release
Problem: Debug builds use a temporary debug key that changes, causing install conflicts.
Solution: Use a consistent debug signing config OR uninstall old version first.
Use the release build with your keystore for testing updates:
npm run cap:build:android:releaseFor development, configure debug builds to use a consistent key in android/app/build.gradle:
signingConfigs {
debug {
storeFile file('../freq.jks')
storePassword 'YOUR_PASSWORD'
keyAlias 'YOUR_ALIAS'
keyPassword 'YOUR_PASSWORD'
}
release {
// ... existing release config
}
}Warning: Only do this for development. Never commit passwords to git!
Before installing a new debug APK:
adb uninstall com.frequencyzen.appOr manually: Settings → Apps → Frequency Zen → Uninstall
- Package Name:
com.frequencyzen.app(same for all versions) - Current Version Code: 2
- Current Version Name: 1.1.0
- Release builds: Configured to use
freq.jkskeystore (viakey.properties) - Debug builds: Use temporary debug key (may cause conflicts)
Before releasing an update:
-
✅ Version Code Incremented: Always increment
versionCodeinandroid/app/build.gradle- Current: 2
- Next: 3, 4, 5, etc.
-
✅ Version Name Updated: Update
versionNamefor display- Current: "1.1.0"
- Follow semantic versioning: "1.2.0", "1.2.1", "2.0.0"
-
✅ Same Signing Key: All APKs must use the same keystore
- Use
freq.jksfor all release builds - Document the keystore location and backup
- Use
-
✅ Same Package Name: Keep
applicationIdascom.frequencyzen.app
# 1. Build mobile version
npm run build:mobile
# 2. Sync to Android
npm run cap:sync
# 3. Build release APK (signed with your keystore)
npm run cap:build:android:releaseResult: android/app/build/outputs/apk/release/app-release.apk
This APK will:
- ✅ Update existing installations automatically
- ✅ Work on all devices with the app installed
- ✅ Maintain user data (no uninstall needed)
If testing updates:
# Use release build even for testing
npm run cap:build:android:releaseIf just testing features (don't need to update):
# Debug build is fine
npm run cap:build:androidYour freq.jks file is critical:
- Back it up to multiple secure locations
- Never commit it to git (already in
.gitignore) - Document the passwords in a secure password manager
- If you lose it, you cannot update existing app installations
If you need to create a new keystore:
keytool -genkey -v -keystore freq.jks -keyalg RSA -keysize 2048 -validity 10000 -alias freqThen create key.properties:
storeFile=../freq.jks
storePassword=YOUR_PASSWORD
keyAlias=freq
keyPassword=YOUR_PASSWORDCause: New APK signed with different key than installed version
Solutions:
-
For release builds: Ensure using same keystore (
freq.jks) -
For debug builds: Uninstall old version first:
adb uninstall com.frequencyzen.app
-
Manual uninstall: Settings → Apps → Frequency Zen → Uninstall
Cause: Package signature mismatch
Solution: Same as above - ensure consistent signing or uninstall first
Cause: Not actually an update (new install)
Solution: Ensure same package name and signing key
- Major updates (new features): Increment major version (1.0.0 → 2.0.0)
- Minor updates (new features): Increment minor version (1.0.0 → 1.1.0)
- Patch updates (bug fixes): Increment patch version (1.0.0 → 1.0.1)
Version Code (must always increase):
- Each release: Increment by 1 (1 → 2 → 3 → 4...)
- Play Store requires version codes to always increase
v1.0.0 (versionCode: 1) → Initial release
v1.1.0 (versionCode: 2) → Gateway improvements (current)
v1.2.0 (versionCode: 3) → Future features
v2.0.0 (versionCode: 4) → Major update
- ✅ Make code changes in
src/folder - ✅ Test on web version first
- ✅ Increment
versionCodeinandroid/app/build.gradle - ✅ Update
versionNameinandroid/app/build.gradle - ✅ Build mobile version:
npm run build:mobile - ✅ Sync to Android:
npm run cap:sync - ✅ Build release APK:
npm run cap:build:android:release - ✅ Test update on device with old version installed
- ✅ Distribute APK
Files to update for each release:
android/app/build.gradle- versionCode and versionName
Files that must stay the same:
android/app/build.gradle- applicationId (com.frequencyzen.app)- Keystore file (
freq.jks) - same for all releases
Build commands:
npm run build:mobile # Build web assets for mobile
npm run cap:sync # Sync to Android/iOS
npm run cap:build:android:release # Build signed release APKRemember: Always use the same signing key for all release builds to ensure seamless updates!