-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local Keystore is not present or missing? #34
Comments
someone please help? |
The file is created automatically when you compile the project in debug. If you are not compiling it, you need to create it before. You can create a new one executing this command inside the container. keytool -genkeypair -v -keystore ~/.android/debug.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias androiddebugkey -storepass android -keypass android Otherwise, if you prefer a Gradle task: tasks.register("generateDebugKeystore") {
group = "build setup"
description = "Generates a debug.keystore file in the ~/.android/ directory."
doLast {
val homeDir = System.getProperty("user.home")
val keystorePath = "$homeDir/.android/debug.keystore"
val keystoreFile = File(keystorePath)
if (keystoreFile.exists()) {
println("debug.keystore already exists at: $keystorePath")
} else {
println("Generating debug.keystore at: $keystorePath")
val command = listOf(
"keytool",
"-genkeypair",
"-v",
"-keystore", keystorePath,
"-keyalg", "RSA",
"-keysize", "2048",
"-validity", "10000",
"-alias", "androiddebugkey",
"-storepass", "android",
"-keypass", "android"
)
val process = ProcessBuilder(command)
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
.redirectError(ProcessBuilder.Redirect.INHERIT)
.start()
val exitCode = process.waitFor()
if (exitCode == 0) {
println("debug.keystore generated successfully!")
} else {
println("Failed to generate debug.keystore. Exit code: $exitCode")
}
}
}
} Execute this task before building the APK with Bundletool. |
@alvr Thank you so much, will try this way and get back to you for an update. |
@alvr Hi, Below are my observations. ->for aab generation, tried with gradle task - bundleProdDebug or bundleDebug but its not creating debug.keystore nor present. why? |
By default, AABs are not signed during creation if the signingConfig is not specified for that buildType. That is because the signing is done when creating the APK from that AAB. https://developer.android.com/build/building-cmdline?hl=en#bundle_build_gradle |
We are using alvrme/alpine-android:android-34-jdk17 image for our android project.
Challenge: while extracting apk from aab build, we see warning saying debug.keystore isn't present under ~.android/ folder.
why is not present or where shall we find that local debug.keystore signing thing. Please respond what are we missing here and what are the steps to be taken care of.
@alvr
The text was updated successfully, but these errors were encountered: