I have tried generating new key using keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000. Copied it to android/app/ and ~/.android/. It keeps complaining. When I run ./gradlew signingReport it is fine.
In my build.gradle I have
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://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
My fastlane fastfile
desc "Submit a new build to Play Store 'Testing' track"
lane :testingtrack do
# gradle(task: 'assemble', build_type: 'Release')
gradle(
task: "bundle",
build_type: "Release",
print_command: false,
)
increment_version_code(
gradle_file_path: "app/build.gradle",
)
upload_to_play_store(track: 'Testing', skip_upload_apk: true)
# slack(message: 'Successfully distributed a new beta build')
end
I am trying to upload a beta app, it worked once before but I recloned my repo and did not save the old key. I have also tried to generate new signing key using Android Studio which fails with different error, "cannot read the file". I also tried to download the upload key off play store which does not work as well.
Without your previous debug key, you can't fix this.
Your last uploaded app was apparently signed with the debug key which was automatically created by Android Studio. A debug keystore is however still a valid keystore which you can use for release.
Once you upload an app to the Play Store in any of the release or test tracks (production, beta, alpha, internal) you are locked in. You can then only update the app if you use the exact same signing key again.