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
1
Question by xstahef · Aug 04, 2013 at 02:23 PM · androidbuild

How do you test Android deployment ?

Hello,

I've just started small project for android with Unity 4.2. Could you please tell me how do you test the apk file ? I have a problem with the sdk emulator.

When I launch application on the editor, it"s perfect. When I test on android sdk emulator, the application is closed directly (without other message than : "unfortunatly, ...". I have reinstalled the sdk and create multiples adv, with the same result...

I'm using Windows 8 64b and Unity 4.2.

Thanks for your help.

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
6
Best Answer

Answer by Bunny83 · Aug 04, 2013 at 05:43 PM

If you really want to test your APK you have to deploy it on a real device.

This can be done in two ways:

  • If you have a working USB driver for your device, so the adb interface can work with it, just do a Build and run from Unity

  • If you don't have the right USB driver or can't get it working you can simply build the apk, put it somewhere your device can access it (dropbox, local file sharing, ...) and use a filemanager on your device to get the apk. In our company we use this one.

Note: You have to allow unsigned apks to be installed on your device. It's an option in your device settings. Also to get the first way working you have to enable the developer options and USB debugging on the device.

The first solution is always the better one since USB debugging also gives you direct access to the device log. However it's sometimes a bit tricky to get it working. On some newer devices they have hidden the developer options and you first have to unlock them by tapping the build number 7 times.

Comment
Add comment · Show 3 · 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 xstahef · Aug 04, 2013 at 06:45 PM 0
Share

Thanks, I will test on real device.

avatar image andrewwebber25 · Jul 25, 2017 at 08:28 PM 0
Share

I know this is an old post but this guy is totally right. I hooked up my Galaxy S5 to my laptop and tried for like two hours to get the right drivers. No matter what, when i did "Build and Run" it would say that it couldnt detect any Android devices. Then I tried it on tons of emulators including: Andy roid, nox, bluestacks and android studios. None of them would do more then load a blank screen. I was so mad and didnt know why my apk file wasnt working. Then i went on my gmail on my computer, attached my apk file to it and emailied it to myself. Opened the email and attachment from my android and it was working perfectly in two $$anonymous$$. Easily the best way to do it!

avatar image voporak5 andrewwebber25 · Jul 25, 2017 at 08:58 PM 0
Share

For a handful Samsung devices you have to download the drivers from the Samsung website. Just google your device name and add drivers into the search.

Connecting to your PC might work O$$anonymous$$ though for your Galaxy S5.

Be sure to restart your PC though, drivers get loaded when the PC boots up so installing and then testing isn't enough.

If that doesn't work don't feel like you need to email the AP$$anonymous$$ to yourself if the device you want to test on shows up in the File Explorer. Just drag the AP$$anonymous$$ to your device there and browse for the AP$$anonymous$$ on your device via a File Explorer App.

avatar image
2

Answer by voporak5 · Aug 04, 2013 at 05:02 PM

They've got this app called Unity Remote that you can download to your android device. Just run that bad boy with your device plugged into your comp and hit Play. You may have to plug it in, open it up and then close and open Unity back up. Problem is the Frame Rate can suck but nevertheless it's easier than making a build just to test.

Comment
Add comment · Show 4 · 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 xstahef · Aug 04, 2013 at 05:29 PM 0
Share

Thanks for your reply, I didn't know Unity Remote. I have no device, I will install this on an emulator, and check why I can't install the apk package.

avatar image Bunny83 · Aug 04, 2013 at 05:34 PM 0
Share

Note that you still play the game in the editor. Unity Remote is just a, well, remote control. You don't really test on your device that way. All you get is all the input the device is providing is routed to the editor.

The only way to really test a build is to copy it onto a real device, but i'm not sure if that's the OPs actual problem. $$anonymous$$aybe he doesn't have an android device?!

avatar image Bunny83 · Aug 04, 2013 at 05:45 PM 0
Share

The simulator is not really suited for Unity. It's ok for native apps, but Unity requires a lot lowlevel hardware power which the simulator usually can't handle.

avatar image bodec · Aug 15, 2016 at 10:37 AM 1
Share

Thank you had so many issues spent 3 hours attempting to look up my solution finally reading yours when it said to restart unity I remembered older versions had that issue and as soon as I restarted unity it all worked thank you

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

18 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

Related Questions

Distribute terrain in zones 3 Answers

Edit PlayerPrefs via Java Project Android? 0 Answers

Can't find android app 1 Answer

Why can I build the apk but I can't build and run? 0 Answers

Unfortunately, "GameName" has stopped. 0 Answers


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