Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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

Discussion in 'Android' started by Maccyfin, Oct 27, 2013.

  1. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    86
    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
     
  2. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    86
    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
     
  3. acatalept

    acatalept

    Joined:
    May 21, 2013
    Posts:
    2
    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!
     
  4. flashmandv

    flashmandv

    Joined:
    Mar 26, 2015
    Posts:
    143
    Thank you @acatalept Your solution worked for me. Moving on the next error..
     
unityunity