Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
15
Question by Sericet1 · Feb 21, 2013 at 11:45 PM · android

Building for Android

Hey Everyone,

Having a lot of trouble building my app for the android.

I have been able to build an APK file and have it installed on my tablet and phone. I have created a marketplace accound and have uploaded an APK to it (Not a development build). I could see it on the market place and had a friend download it to see if it works.

It didn't work :( The error was something to do with signing.

I don't really understand the signing and keystore stuff in the publishers section of the build. I was hoping someone could help me with this step. If I can get the proper APK file made then I'm laughing!

How do I sign the APK? DO I even have to? does unity do it for me by default? What is this keystore thing? DO I need to worry about it?

Thanks guys. Been looking this up and I can't find a clear answer. Thanks guys

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

3 Replies

· Add your reply
  • Sort: 
avatar image
31
Best Answer

Answer by Bunny83 · Feb 22, 2013 at 01:03 AM

The keystore is a signature file that is used to sign your apk. When you create development builds Unity will not sign the apk.

You only need one Keystore file for your projects. The file is your signature. To create one do this:

  • In the publishing settings check the "Create New Keystore" box.

  • Click browse and choose a location where you want to store the file. It should be somewhere central since it's not really related to your project.

  • Set a protection password for the file and confirm it.

  • Select "Create a new key" from the "Key Alias" dropdown.

  • A window should open which you have to fill with your personal data about your organisation / person. The alias at the top is just a name of the keystore. If you have multiple identities make sure you choose a meaningful name. You need to set a keystore password. Note this is not the same as the protection password above. As far as i know they can be the same, but for security you should use two different. If you haven't write the passwords onto a sheet of paper ;)

  • Click "Create Key" to generate your keystore file.

To use a keystore for signing you have to:

  • Check the "Use Existing Keystore" box.

  • Click browse and select your keystore file.

  • enter your protection key.

  • select your desired identity from the alias dropdown.

  • enter the alias password in the field below

  • Make sure you have set your Android Market Licensing RSA Public Key at the bottom of the publishing settings. The public key has to be acquired from your Google market account.

  • Now create your APK file and it will be signed with your identity.

Note: You can create multiple Keys / Identities in one Keystore file. The first protection password will protect the file itself. When you select an identity from the file in the alias dropdown you have to type in the password for the identity.

Comment
Add comment · Show 11 · 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 Bunny83 · Feb 22, 2013 at 01:13 AM 0
Share

ps: For more insight into the signing why you need it and how it works see this well-written page on android.com

avatar image Auggie · Apr 16, 2013 at 09:15 AM 0
Share

hi, Bunny83. i am using unity 4.0. i find your answer most helpful. except for the part about the Android $$anonymous$$arket Licensing RSA Public $$anonymous$$ey. i cannot find it at the buttom of the publishing settings. it only has the "split application binary" checkbox. is it located somewhere else? or is there something else that i need to do?

Thanks!

avatar image Bunny83 · Apr 16, 2013 at 12:28 PM 0
Share

Well, it seems they removed the field because it seems it had no actual function ;)

http://answers.unity3d.com/questions/311117/how-does-unity-use-the-android-market-licensing-lv.html

avatar image Auggie · Apr 17, 2013 at 01:16 AM 0
Share

oh...thanks for the info! i hope this works now ^_^

avatar image Auggie · Apr 19, 2013 at 07:36 AM 1
Share

thanks so much! it worked! hehehe btw, if you want to see the game, this is the link: https://play.google.com/store/apps/details?id=com.Fractaldev.Shooter1&feature=search_result#?t=W251bGws$$anonymous$$SwyLDEsImNvbS5GcmFjdGFsZGV2LlNob290ZXIxIl0.

thanks again! ^_^

Show more comments
avatar image
1

Answer by ddas · Jan 02, 2017 at 10:36 AM

Pay attention to Create New Keystore and Alias


sign-apk-copy.png (120.6 kB)
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 Lenvanthis012 · Aug 20, 2015 at 09:42 PM

I am using Unity 5. For me, making a new keystore from Unity didn't work.
From unity, you build with the option "Google Android Project". Then from Android Studio, open the project. And From the build menu, "clean the project". Then "Generated Signed Apk" in the build menu lead to the successful release build.

A long painful process to figure.... Ughh....

Comment
Add comment · Show 1 · 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 Virdari · Sep 06, 2015 at 06:47 AM 0
Share

How did it not work? (Player Settings -> Publishing Settings of Android) 1- Press create new keystore button 2- Select a directory and a name for yourkeystore 3-Enter a keystore password 4-Confirm your password 5-Click on Unsigned (debugkey) 6-Click on Create new key selection under the Unsigned 7-Create your key. Enter a password for that specific key. (NOT THE $$anonymous$$EYSTORE) 8-Now you will have a keystore, which is exactly what it sounds like. It stores keys. The key you created is also part of it, since it's a storage file of keys. 9- Go to your JD$$anonymous$$ file. Usually something like C:\Program Files\Java\jdk_1.x.xxx\bin\ 10- Use the keytool utility to sign your keys and get a SHA-1 certificate which you will plug in for the Oauth2 Client ID, during the authorization process of your app, in Google Play Store Services. 11- Open a cmd file and change directory to jdk1.x....\bin\ file where keytool resides. 12- type keytool -exportcert -v -list -alias -keystore 13-It will ask for the password which you entered for the Alias during Step 7. Enter it again 14- You will get your certification. Among them will be the SHA-1 Certificate. Copy paste it to the Play Store Services page. 15- You've made it !

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

21 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

Related Questions

Android rendering 0 Answers

How to make the terrain texture look sharp on android? 2 Answers

I want to ask about Android developers 0 Answers

Why APK freezes at start of game level? 0 Answers

How do I save a screenshot to the gallery on Android Kitkat 4.4.2 or above? 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