Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by kelvin-w · Oct 13, 2017 at 04:15 AM · android buildandroid sdk

cant build android apk error: CommandInvokationFailure: Failed to sign APK package

i am trying to build a test for my app. when i build the app i get the following error

     CommandInvokationFailure: Failed to sign APK package.
     C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.2\apksigner.bat sign --ks "D:/Programming/UnityProjects/MobileProject-resortTycoon/user.keystore" --ks-pass stdin  --ks-key-alias "test123" --key-pass stdin  "D:\Programming\UnityProjects\MobileProject-resortTycoon\Temp/StagingArea/Package.apk"
     
     stderr[
     Error: keywords 'java|openjdk version' not found in 'picked up java_tool_options: -df'
     Error: keywords 'java|openjdk version' not found in 'picked up java_tool_options: -df'
     Failed to load signer "signer #1"
     java.io.IOException: Invalid keystore format
         at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:658)
         at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
         at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
         at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
         at java.security.KeyStore.load(KeyStore.java:1445)
         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)
     Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
     ]
     stdout[
     Keystore password for signer #1: 
     ]
     exit code: 2
     UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
     UnityEditor.Android.Command.RunWithStdin (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.String[] input)
     UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, System.String[] stdin)
     UnityEditor.Android.PostProcessor.Tasks.BuildAPK.SignPackage (UnityEditor.Android.PostProcessor.PostProcessorContext context)
     UnityEditor.Android.PostProcessor.Tasks.BuildAPK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
     UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
     UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
 



i already tried reinstalling the android sdk and updating it to latest version, downloading different android versions, using the new gradle instead of internal. nothing worked. after an hour of searching for a solution i still dont know how to fix this. can someone help me? thanks alot!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by ikhsaniks · Mar 14, 2018 at 04:05 PM

Hi @kelvin-w Unity version of 2017 or later are only compatible with SDK 25.2.5 and JDK 1.8.161 (I think). So change your SDK -> Tools with 25.2.5 version. If you don't want to overwrite your tools folder you can rename it to something else. Here is my SDK and JDK you can download and add it to the Unity -> Preferences -> External Build https://drive.google.com/drive/folders/16n3hvR9JfTaKWW0MGNDhHLc6XIg3agM9?usp=sharing

hope it works on you. Insya Allah. Regards, Ikhsan Syahputra.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by kelvin-w · Oct 14, 2017 at 10:20 AM

no one? cant anyone help me?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

72 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

unity android internal only 0 Answers

Error Build APK (aapt.exe) 0 Answers

Are there tutorials on how to get my project into android studio? 0 Answers

How come when I generate a signed APK it produces out a JKS file? 0 Answers

Should we download android modules again? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges