Android APK Rejections / Upload Errors with Google Play & Amazon App Store.

2

Comments

  • indra.azizindra.aziz Member Posts: 102
    edited May 2020

    I succeeded in signing my apk manually (on windows) after watching @Armelline 's video, even though it's mac focused the concept is still the same on windows, (thanks!)

    You can actually drag your file to the command prompt and it will write the directory of that file, and very important: if you have a folder name that has a space, the directory written in the command prompt will be in double quotes "" and just let it be because it basically making sure the command prompt reads it as one thing.

    So just do what @Armelline does in the video, good luck!

    Here's the link to the video again https://www.youtube.com/watch?v=jy5ndat-kVU

  • ah4000ah4000 Member, PRO Posts: 15

    yes on windows. i did watch the video and thank you very much for making that. ...I've managed to get where it asks for the password and then again i get "failed to load signer" keystore contains multiple entries --ks-key-alias must be used. Really can't wait for the GS fix because i am tech stupid and this has become so frustrating :)

  • ah4000ah4000 Member, PRO Posts: 15

    ok, i made a new keystore and it finally worked!! so i can upload to amazon but i won't be able to update anything on google play with a different keystore haha .. anyways, Thank you guys soooo much! most appreciated. now gotta figure out my original keystore problem

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685
    edited May 2020

    @Armelline I have tried the solution via terminal and it errors saying "Unsupported option: --in. See --help for supported options" So I have tried your APK signer (Very tidy app!) but it comes up with the same error! although getting one step closer (as your app asks me for my Password) Why am I seeing this? Why is is rejecting the command --in

    Im running 10.14.6 on a macbook

  • ArmellineArmelline Member, PRO Posts: 5,353
    edited May 2020

    Sounds odd! My app asking for your password means nothing - it pre-caches it (only in AppleScript's memory though) ready for the step where it's needed. All it does it build the commands for you and then run them in the background, saving you the trouble of putting together all the parts.

    I'm far from an expert with apksigner - I mostly just went with the commands GameSalad provided, but added the password input to the command used in my app. I was also running on 10.14.6 until today, so it's definitely not a Mojave issue.

    What version of the Android SDK are you using? Perhaps it's an older one? I tested with 27.0.3 and 29.0.3 iirc.

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    @Armelline

    Dam! I was hoping you would have the answer! Google was not my friend with this one.

    I have installed 29 installed but the folder I have my zip align in is called 25.0.2. So maybe this could be the issue? However I dont have a folder called 29.X in my android studio even though I have 25-29 installed

    In terminal, it fails just before the password request and in your app it fails after asking which makes sense if your storing the password ready.


  • ArmellineArmelline Member, PRO Posts: 5,353
    edited May 2020

    Grab it again from the Dropbox link GameSalad provide. That has 29.x versions of the tools. Definitely the first thing to try.

    https://www.dropbox.com/s/zkhef9hcwz42l8a/android-sdk-macosx.zip?dl=0

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685
  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    That worked perfect with your tool. So was the issue. I haven't uploaded it to google yet but I can assume that it will be fine as the app ended in success. Thanks again

  • ArmellineArmelline Member, PRO Posts: 5,353

    If it pumped out a datestamped apk that says _signed at the end, then it should be all good! Glad it helped.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    So I just realized that the _signed bit was something I like to do to see the chain of files I'm making. If you leave out the --in and --out params, and just put the apk file path, it will sign the APK in place.

  • cagrisavancagrisavan Member, PRO Posts: 19

    Thank you @Armelline and @adent42 I finally did it after I watched Armelline's video. I uploaded my apk but when i tired to publish Unoptimized APK

    ''Warning:

    This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices.

    Resolution:

    Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs.'' screen popped up. Can you please help ?

    Thanks

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    You can ignore that warning. It's not something we'll be supporting anytime soon. It's a feature for developers creating their apps from scratch (it lets you create build targets that can exclude / include difference resources depending on the device the game is going to be loading on).

  • cagrisavancagrisavan Member, PRO Posts: 19

    Thank you @adent42 . But it doesn't allow me to click on start rollout to production button. It says

    ''Warnings

    Check these warnings before starting the rollout of this release. Addressing the warnings on this page will ensure your existing users are able to upgrade to the latest version of your app.''

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    You can dismiss the warning. I just did it but forgot how. I think there's an (x) on the warning msg somewhere).

  • WCgamesWCgames Member, PRO Posts: 4

    I can't use [Google play / Amazon] now with [windows GS]. I hope it's as easy to use as before.

    In the past, GS Android package signer was very convenient to use. Now why do GS often have so many problems?

  • CSanoActCSanoAct Member Posts: 8

    Having the same issue as the image above. Uploading APK to Google Play just gives the error "Upload Failed" without a specific reason..

  • WCgamesWCgames Member, PRO Posts: 4

    Will you fix the APK signer of GS tools in the future?

    It used to be very easy to use, so I hope GS can repair APK singer tools

    Will not use Android studio

    Android studio won't use........

  • ArmellineArmelline Member, PRO Posts: 5,353

    They will fix it, but you need to get used to signing manually in the mean time. There are instructions and video tutorial (Mac focused but applicable to Windows too) higher up in this thread. You don't need to install Android Studio to do it.

  • CSanoActCSanoAct Member Posts: 8

    I will try it now, it's just weird because I already uploaded 2 different versions to Alpha to test the app. But now it won't upload my newest APK.

  • CSanoActCSanoAct Member Posts: 8

    How did you get it to work on Windows? I am not good at this stuff but I followed along with the video and got this result...


  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    Look at your command line. You need a space between the two file paths:


    C:\Users\User\Destkop\zipalign.exe -v 4 C:\Users\User\Desktop\Ultimate_Movie_sounds_unsignedV4(4).apk C:\Users\User\Desktop\Ultimate_Movie_sounds_zipaligned.apk

  • NKBDLNKBDL Member, PRO Posts: 100

    Error: A JNI error has occurred, please check your installation and try again

    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClass(Unknown Source)

        at java.security.SecureClassLoader.defineClass(Unknown Source)

        at java.net.URLClassLoader.defineClass(Unknown Source)

        at java.net.URLClassLoader.access$100(Unknown Source)

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)



    Hi all! I got the above error when I run the apksigner.bat. I updated java to the latest version as well and tested it it is still telling the same...

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    @NKBDL you likely need a newer version of Java. Looks like you'll need java 1.9 (which maps to class file version 53).

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,151

    @ah4000 for your signing issue with --ks-key-alias, it sounds like you have a keystore with multiple aliases (remember the step in the GameSalad signer where you have to pick an alias from a dropdown?).

    You can use the command:

    keytool -v -list -keystore .keystore
    

    (where .keystore is the path to your actual keystore) to list the alias in the keystore.

    If you remember which one it is, just add it to the apksigner command line as another option right after the --ks <keystore path> option. Somthing like:

    apksigner sign --ks <keystore path> --ks-alias <keystore alias> --in <zipaligned apk path> --out <output apk path>
    


  • NKBDLNKBDL Member, PRO Posts: 100

    I tried an older version of the build-tools, 27.0.1 (I updated and was trying out 30.0.0-rc but there was java issue), now another error:


    Keystore password for signer #1:

    Failed to load signer "signer #1"

    java.io.IOException: Invalid keystore format

        at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)

        at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)

        at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)

        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)

        at java.security.KeyStore.load(Unknown Source)

        at com.android.apksigner.ApkSignerTool$SignerParams.loadKeyStoreFromFile(ApkSignerTool.java:829)

        at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:719)

        at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:659)

        at com.android.apksigner.ApkSignerTool$SignerParams.access$500(ApkSignerTool.java:611)

        at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:266)

        at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)

Sign In or Register to comment.