Search Unity

(Android build error) Can not sign application Unable to sign application; please provide passwords!

Discussion in 'Editor & General Support' started by Zephni, Jan 14, 2016.

  1. Zephni

    Zephni

    Joined:
    Apr 23, 2015
    Posts:
    100
    I have Googled and Googled but maybe I am missing something simple here, any help would be greatly appreciated.

    I have created the keystore using Unity's built in publishing settings for Android. I 100% have the correct password. I have also clicked "browse" and make sure the correct keystore is selected and also chosen the correct Key Alias and input the password below it. (I have uploaded an image regarding this)

    I have also got my JDK path and Android SDK path in my environment variables. I'll just show them below so you can check I haven't done something stupid:
    ANDROID_HOME = C:\Android\adt-bundle-windows-x86_64-20140321\sdk
    JAVA_HOME = C:\Program Files\Java\jre1.8.0_66

    I have also installed the latest build-tools being: sdk/build-tools/23.0.2
    Plus I have installed "Android support repository", "Android support library", "Google play services", "Google repository" through the Android SDK Manager.

    Then when I go to build I get the following error. I have Google this alot but can't seem to find it but maybe I'm just missing it!

    Any help would be hot :) Full error below:

    Code (CSharp):
    1. UnityException: Can not sign application
    2. Unable to sign application; please provide passwords!
    3. UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex)
    4. UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message)
    5. UnityEditor.Android.PostProcessAndroidPlayer.CheckPrerequisites ()
    6. UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    7. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    8. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    9. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    10. UnityEditor.HostView:OnGUI()
     

    Attached Files:

    Last edited: Jan 14, 2016
  2. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    Have you successfully built to an android device before or is this your first time? The keystore might be corrupted. If you haven't already uploaded to Google play services you could just generate a new keystore for the project.
     
    HASSANB97 likes this.
  3. Zephni

    Zephni

    Joined:
    Apr 23, 2015
    Posts:
    100
    Thanks for your reply! I have tried creating a new keystore a bunch of times, using different software to do so, and I have tried Unity's one a few times. Also yes I have exported to Android 100's of times before this. with the same project.

    The problem may be related to this... I tried to include the package https://github.com/playgameservices/play-games-plugin-for-unity in my project, but it was riddled with errors, so I removed it. I wonder if that has caused some issues, or if deleting all the files has actually removed it entirely.

    If not, it may be something else but still really confused :(
     
  4. Zephni

    Zephni

    Joined:
    Apr 23, 2015
    Posts:
    100
    Update.. I use git for versioning, so I have gone back to two versions ago, where the keystore stuff hadn't even began. On exporting I still get an error:

    Code (CSharp):
    1. CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    2. C:\Android\adt-bundle-windows-x86_64-20140321\sdk\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Android/adt-bundle-windows-x86_64-20140321/sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages com.google.example.games.mainlibproj
    Ahhhhhhhhhhh.... *relax* * relax* it's ok.... :( Any idea's anybody?
     
  5. Zephni

    Zephni

    Joined:
    Apr 23, 2015
    Posts:
    100
    Ah.. fixed! I found in a comment on another site that I should also delete the "Plugins" folder, I never knew that it was ever created. So basically I deleted the "Assets/Plugins" directory which had and "Android" and "IOS" directory inside it, and I no longer got the error!
     
  6. john_old

    john_old

    Joined:
    Oct 31, 2015
    Posts:
    1
    Thank you for your share
     
  7. hameed11

    hameed11

    Joined:
    Aug 7, 2016
    Posts:
    6
    Fixed!! Fixed!! Fixed!! Fixed!! Fixed!! Fixed!! Fixed!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1- Delete (GoogleMobileAds , PlayServicesResolver and Plugins) and import it again.
    2- Create New Keystore .
     
  8. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hi,

    I have the same issue. When I first create a Keystore I can build, but next time I try to build I have this error. I don't have a Plugins/GoogleMobileAds/PlayServicesResolver folders - so I cannot delete them.

    Any idea on how to fix this issue ?

    Thanks
     
  9. bizzcodestudios

    bizzcodestudios

    Joined:
    Jul 24, 2017
    Posts:
    1
    Solved.. solved no need to delete plugin folder.
    just change the Key alisas to Unsigned (debug).
    Under Player Settings-> Publishing settings -> key.
     

    Attached Files:

  10. thedarcsage

    thedarcsage

    Joined:
    Nov 2, 2016
    Posts:
    23
    Thanks!!

    Funny thing is that this worked for me too. My keystore was selected and passwords were put in, but it still didn't work.

    Then I switched it to Unsigned first. Then switched it back to my Alias, and the error went away.
    (The error occurred after updating to 2017.1 and reimporting a whole bunch of things.)
     
  11. normidar

    normidar

    Joined:
    Feb 7, 2018
    Posts:
    1
    i have the problem same ,and
    how to make it isn't a problem ?
    i chose the other chose !
     
  12. zecmo_teamproxi

    zecmo_teamproxi

    Joined:
    Aug 22, 2017
    Posts:
    1
    Thanks much! This fixed my issue for me : D
     
  13. Nk_Khumbhani

    Nk_Khumbhani

    Joined:
    Nov 11, 2017
    Posts:
    1
    Fixedddddddd Thanks a lot..
     
    mikesolanomo likes this.
  14. Krush41

    Krush41

    Joined:
    May 20, 2019
    Posts:
    1
    Mine keeps saying Unable to sign application; please provide passwords!
    Any ideas about why it's doing this or any ideas about how to fix it?
     
    Tony-Sparrow likes this.
  15. Gptshubham595

    Gptshubham595

    Joined:
    Nov 6, 2018
    Posts:
    1
    simply in player setting-> Other settings -> add password
     
    icednicco likes this.
  16. bhushanrocks412

    bhushanrocks412

    Joined:
    Jul 31, 2018
    Posts:
    1
    thanks
     
  17. yoyo7

    yoyo7

    Joined:
    Mar 6, 2017
    Posts:
    1
    Thanks
     
  18. GetLitGames

    GetLitGames

    Joined:
    Sep 24, 2014
    Posts:
    11
    Just go to your Player Settings -> Publishing Settings and enter the passwords in both fields for the keystore and the key..
    they aren't saved by Unity you have to enter them every time you reopen Unity...
     
    Melanzue likes this.
  19. cihad_unity

    cihad_unity

    Joined:
    Dec 27, 2019
    Posts:
    35
    What a torture!!! Anyone find a solution to this?
     
  20. simonsanches

    simonsanches

    Joined:
    Mar 23, 2020
    Posts:
    1
  21. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    383
    You sir are an immense genius! Thank you.
    So this happens when switching from AAB(googleplay) to APK(android) build.
     
  22. unity_btkiGPiGhCEfIA

    unity_btkiGPiGhCEfIA

    Joined:
    Feb 17, 2020
    Posts:
    1
    Got this problem first time in new Unity 2019.3.5. In Unity 2018.3.14 everything built successfully. All suggestions above I already tried with no luck. Any new solutions?
     
  23. himzy

    himzy

    Joined:
    Mar 24, 2015
    Posts:
    5
    I found a solution that worked for me.
    Go to player settings -> Publishing -> uncheck "Custiom key".
     
    URPian likes this.
  24. tonythedad

    tonythedad

    Joined:
    Apr 5, 2020
    Posts:
    12
    Wouldn't you need the custom key to work when it's time to publish your game?
     
  25. barisalhan

    barisalhan

    Joined:
    Mar 29, 2020
    Posts:
    3
    [SOLVED] In the case you have alread a key and want to take a release build you need to enter the two passwords within the publish settings. Then, during build, Unity will automatically use these passwords and your authentication problem will be solved.
     
  26. izhankhalib

    izhankhalib

    Joined:
    Apr 29, 2018
    Posts:
    2
    [SOLVED] In Project Setting > Publishing Setting > look for password fill, just fill it with the correct password.
    1) Project Keystore password
    2) Project Key password

    Fill up these passwords and you are good to go.
     
  27. nio2edward

    nio2edward

    Joined:
    Jul 27, 2020
    Posts:
    3
    the solution is to disable the keystore :) it worked for me
     
  28. siddhant9763

    siddhant9763

    Joined:
    Apr 29, 2020
    Posts:
    1
    simply type your passwords in Player Setting -> Publishing setting. there are two passwords:
    1) password for open KeyStore,
    2) password for the project key
    these passwords are you set at the time of key creation. so add it to the publishing set before building the game. no need to delete plugins and all.

    I think this solves your problem
     
    ZiadMahmoudSayd and haroldo7 like this.
  29. pablomunheco2005

    pablomunheco2005

    Joined:
    Oct 14, 2019
    Posts:
    1
    Thank you so much dude. You just saved my ass
     
  30. watsonroger11

    watsonroger11

    Joined:
    Aug 7, 2021
    Posts:
    1
    thanks so much you saved me
     
  31. RulaPRO

    RulaPRO

    Joined:
    May 31, 2019
    Posts:
    1
    reconfiguring the keys in the store helped me
     
    ZiadMahmoudSayd likes this.
  32. ZiadMahmoudSayd

    ZiadMahmoudSayd

    Joined:
    Aug 12, 2020
    Posts:
    1
    THANKS, you helped me a lot , I entered password twice and it succeeded to build
     
  33. unity_5syeWgc8HGfUSA

    unity_5syeWgc8HGfUSA

    Joined:
    Apr 5, 2021
    Posts:
    1
    no need for that, just go to build settings>player settings>Publishing settings and type project keystore password and project key password. That in general happened because you probably tried publishing and made a key
     
    mickeyband and amoderng like this.
  34. l190964

    l190964

    Joined:
    Nov 13, 2022
    Posts:
    4
    Well, during the build sometimes KeyStore pwd is removed, so in my case I re-enter the pwd and it worked so kindly check that too!
     
  35. unity_C8C17961514FD8933DC5

    unity_C8C17961514FD8933DC5

    Joined:
    Oct 29, 2022
    Posts:
    1
    You save my day it works for me
     
  36. vedanti_mungekar

    vedanti_mungekar

    Joined:
    Jan 17, 2023
    Posts:
    3
    sloved
     
  37. VitasIII

    VitasIII

    Joined:
    Apr 30, 2021
    Posts:
    3
    Thanks, worked