Android keystore problem - transferred project to new mac, i get an error

Hi all. I recently moved my project to a new mac. I also copied the keystore file but I get an error now when I try to do a build. The new mac folder structure is a little different than the old mac, could this be the problem. Here’s the error I get:

Unable to list keys in the keystore. Please make sure the location and password of the keystore is correct. See the Console for more details.
Error: Unable to read ‘/Users/martinfinch/Documents/CobaltPlay/Projects/2DPlatformerX/2dplatformer.keystore’
Error: Keystore was tampered with, or password was incorrect
UnityEditor.Android.CommandInvokationFailure: Unable to list keys in the keystore. Please make sure the location and password of the keystore is correct. See the Console for more details.
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java -Xmx1024M -Dcom.android.sdkmanager.toolsdir=“/Applications/Unity/adt-bundle-mac-x86_64-20130917/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/Unity.app/Contents/BuildTargetTools/AndroidPlayer/sdktools.jar” -

Does anyone know how to transfer the keystore to a new mac? Does the folder structure on the new mac need to be the same as the old mac?

Thanks for any help
Martin

Ok, I found a solution to this. I had to create the same folder structure on my new mac as the old one, and add the keystore file in there.

So I added a new folder under the ‘users’ folder so the keystore location is the same as on the old mac. like this:

/Users/Martin/CobaltJungle/Projects/Mobile/2DPlatformer/2dplatformer.keystore

In case someone else runs into this, I found a more simple solution:

  1. Under “Project Settings → Editor”, change “Asset Serialization” to “Force text” - this will convert all your .asset files to human-readable plain text.

  2. Then under your project folder (“2DPlatformer” in the example above), find the folder named “ProjectSettings”, and within that open the file “ProjectSettings.asset” in a text editor.

  3. In there you should see a value named “AndroidKeystoreName” which includes the full path to the keystore - just remove all the path information up to and including the project folder and trailing slash, leaving just the keystore file name and any path information below your project folder (unless it’s in the root of the project, as in the example above). In the above case, this would leave the value as just “2dplatformer.keystore”

I use this method to work on my project on different computers (synced with Git), with the project on each computer residing under a different path and drive letter.

Good luck!

6 Likes

Thank you @acatalept Your solution worked for me. Moving on the next error…

1 Like