Keystore Signing



  • So I'm now at the point where I'm ready to shove apps to google play. I've gotten past most of the hurdles myself but I'm following steps and getting a not found error. I'm following this article here:

    http://blog.pnapieralski.com/haxeflixel/publishing-your-first-android-game-using-haxeflixel/

    This is what my Project.xml looks like:

    <certificate path="LockerRaidCrew.keystore" alias="LockerRaidCrew" password="mypassword" if="android" unless="debug"/>

    This is how I generated the key:

    keytool -genkey -v -keystore LockerRaidCrew.keystore
    -alias LockerRaidCrew -keyalg RSA -keysize 2048 -validity 100000

    The file LockerRaidCrew.keystore is in the same folder as Project.xml. This is what I'm getting after lime build android:

    https://twitter.com/RobClemmonsJr/status/913724833648775168

    Why am I getting that error and how do I fix it? Anyone know?



  • @xhunterko

    I haven't done this for some time but was able to publish my apps to Google Play a couple of years ago.

    keytool - the example I referenced used all lowercase for alias and keystore name. I don't have the link for it, sorry. I have an extra -v in mine too, and the -validity you have is 100000. Try making it 10000, or 25 years. I didn't use -keysize.

    keytool -v -genkey -v -keystore keysforallmygames.keystore -alias lockerraidcrew -keyalg RSA -validity 10000
    

    Note that the keystore file is for all apps, so you should only make one and add the aliases and keys to it for each app. And keep it safe and make a backup. You'll need it to upgrade an app if you make any changes later. You can't upload the same app with a different key.

    Project.xml (I keep my keystore file up a dir since it gets used for multiple apps)

    <certificate path="../keysforallmygames.keystore" alias="lockerraidcrew" password="mypassword" if="android release" />
    

    You should delete the export folder and build it new. The .build file too (export/.build). It gets incremented every build and all targets increment it. Google will use this build number and you need to make sure they increment and if you update your app, it must be > last build number. Just to keep in mind.

    EDIT: I just edit my .build file to equal the last version I published before I build an updated version so they are in succession.

    Hope it helps.



  • So, this is what I did. I did what you suggested exactly, and build failed like usual. Then I remembered it not liking commas in folder names and you said something about a main directory for your projects. I USUALLY keep all my projects on the desktop. So I copied the project folder to another directory and ran the same thing annnnnnd it worked?

    For future reference should I move projects out of the desktop before signing? Was that the problem in the first place?



  • @xhunterko

    I personally use C:\Users\Dean\AppDev\Games and put the keystore file and my project folders all in there.

    I don't think the desktop is a good place to work from. It's really just for shortcuts, which I have one to my Games/ folder.



  • yeah i don't think you should work off your desktop, just drop a shortcut there but place your projects somewhere that's real easy to locate

    i personally use C:/gamedev/<mygame> and leave the keystore at C:/



  • Ah, alrighty. Thanks y'all! ^^


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.