[Solved] Android compilation and packaging error Invalid keystore format

Problem description

Running an old open source project, the following error occurs when compiling.

java.io.IOException: Invalid keystore format
Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\ado\.android\debug.keystore": Invalide keystore format

Solution

According to the error message, there is a problem with the signature format of debug.

We only need to open the c drive, of course, the user’s directory, there is a .android directory, delete the debug.keystore inside.

If it prompts that the process is occupied when deleting, exit Android Studio first. Then delete it again.

Finally, re-run the project, and debug.keystore will be automatically generated.