Hi
I have setup different android product flavours and can run successful builds, but eas submit is failing due to not picking up the right package name.
#!/bin/bash -eo pipefail
eas submit --platform android --latest --key=android/***.json
- Linking to project @payright/payright
✔ Linked to project @payright/payright
Project ID: 59c8a51b-789d-4ede-922c-63806d03b6e0
Android package: com.payright.customer
Release track: internal
Release status: completed
Archive type: AAB
Build ID: [latest]
Google Service Key: android/****.json
- Scheduling submission
✔ Scheduling submission
- Submitting your app to Google Play Store
✖ Something went wrong when submitting your app to Google Play Store.
We couldn't figure out what went wrong. Please see logs to learn more.
[logs] Starting uploading Android app
[logs] Downloading archive
[logs] Preparing artifact
[logs] Uploading Android app to Play Store...
[logs] Uploading the app with fastlane
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs] | Summary for supply 2.170.0 |
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs] | aab | /tmp/submissions/4d1248bf-1006-4ba0-b497-c708558a8f03/3f94a51d_6389_426f_85e8_3704e6441445_568f9a0e43da44e58aceb02b99ad846b.aab |
[logs] | track | internal |
[logs] | json_key | /tmp/submissions/4d1248bf-1006-4ba0-b497-c708558a8f03/service-account.json |
[logs] | package_name | com.payright.customer |
[logs] | release_status | completed |
[logs] | skip_upload_apk | false |
[logs] | skip_upload_aab | false |
[logs] | skip_upload_metadata | false |
[logs] | skip_upload_changelogs | false |
[logs] | skip_upload_images | false |
[logs] | skip_upload_screenshots | false |
[logs] | validate_only | false |
[logs] | check_superseded_tracks | false |
[logs] | timeout | 300 |
[logs] | deactivate_on_promote | true |
[logs] | ack_bundle_installation_warning | false |
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs]
[logs] Preparing aab at path '/tmp/submissions/4d1248bf-1006-4ba0-b497-c708558a8f03/3f94a51d_6389_426f_85e8_3704e6441445_568f9a0e43da44e58aceb02b99ad846b.aab' for upload...
[logs] [!] Google Api Error: forbidden: APK has the wrong package name. - APK has the wrong package name.
[logs] fastlane supply failed
[logs] Failed to submit the app
Exited with code exit status 1
CircleCI received exit code 1
My app.json has this…
"android": {
"package": "com.payright.customer",
"versionCode": 4
},
But build.gradle is setup like this:
defaultConfig {
applicationId 'com.payright.customer'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode findProperty("android.versionCode") as Integer
versionName findProperty("android.versionName")
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
productFlavors {
dev {
applicationId 'com.payright.customer.dev'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", "com.payright.customer.dev"
}
uat {
applicationId 'com.payright.customer.uat'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", "com.payright.customer.uat"
}
prod {
applicationId 'com.payright.customer'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
resValue "string", "build_config_package", "com.payright.customer"
}
}
Where should I update in order for EAS Submit to deploy the “dev” version to the right project on Play Store?
Regards