Can't Push Project To Device

Hello Unity Community,

I’m new to Android development. I have not exported to my device at any point. I am trying to Build Run my basic game onto my Samsung Galaxy S3. I installed the Android SDK and enabled USB Debugging under Developer tools. However, exporting always fails for me. It doesn’t produce an error, the export progress bar just gets stuck at “Pushing new content to ”. I’ve let it try for about 30 minutes on a few separate occasions.

It appears to recognize my device, as well as I ensured the drivers from the SDK tools were properly installed on my device. Is there a common reason that this occurs? I’ll provide any other information needed if anyone is willing to assist me.

Thanks in advance!

Is your device in developer mode? Do you have usb debugging enabled and the correct drivers installed?

Thanks for the reply KrayZLogic. Yes, my phone is in developer mode and I have USB Debugging enabled. I am fairly positive that I have the correct drivers installed. Here is what I have done:

*Setup:
-Downloaded and unzipped the ADT bundle (October 30th, 2013 version)
-Ran the SDK Manager. Literally installed every single package and toolset.
-Enabled Developer mode in settings on my Galaxy S3 and checked both USB Debugging and Stay Awake
-Went to my Device Manager in Windows and checked my drivers. Used both ‘Search internet’ and ‘Search computer’ with the Google USB Drivers tool from ADT selected. (Also verified that my device shows up as my phone name under ‘SAMSUNG Android Phone’)

*Unity:
-Created a basic scene in Unity.
-Went to Build Run
-Named Company and Project as well as made the Bundle identifier match
-Clicked Build Run
-It progresses through the bar until it gets to “Pushing new content…” and it stops there.

In fact, I followed http://ramblingsofagamedevstudent.blogspot.com/2013/02/how-to-export-to-android-using-unity.html exactly verbatim and I am still not able to get it to work.

Is there anything important that may have been left out of the preceding website that would hinder the process?

Thanks again for your assistance!

Those were the most obvious problems I could think of. If you have Eclipse, does your phone show up in the DDMS and give you logcat info? A temporary solution would be to build the apk without pushing it to your phone, then drop the apk in your downloads folder on your phone. Or you can email it to yourself through gmail and install it from there.

Thanks for that reply KrayZLogic! Sorry for the late reply, as I had to look into what you meant with the DDMS in Eclipse. I unfortunately have never used Eclipse before. I did notice that when I try to push a project from Eclipse that it times out after about 5 seconds. The exact log message in the Console Overview is:

[2014-02-16 17:58:11 - TestAppName] Android Launch!
[2014-02-16 17:58:11 - TestAppName] adb is running normally.
[2014-02-16 17:58:11 - TestAppName] Performing com.example.testappname.MainActivity activity launch
[2014-02-16 17:58:11 - TestAppName] Uploading TestAppName.apk onto device ‘930ad94d’
[2014-02-16 17:58:16 - TestAppName] Failed to install TestAppName.apk on device ‘930ad94d’: timeout
[2014-02-16 17:58:16 - TestAppName] Launch failed on device: 930ad94d

I am able to see the statistics real-time of my CPU and Memory in the DDMS Information Window tab however. It is almost like my phone registers to the computer, but that it rejects any custom installs. I did notice a setting about allowing unknown sources to install, which was actually disabled when I first posted, but is now checked. Still to no avail sadly.

The good news is that emailing the .apk and installing it directly from my phone works great! Thanks a bunch for that workaround! Now if we can just get a direct test from Unity, I will be one happy camper.

Didn’t see you mention setting SDK path in Unity>preferences>external tools. I’m fairly new to outputting to android myself and also had some setup issues; I’m not sure if it’s crucial but outputting the apk’s to the sdk directory worked, where other build dirs didn’t for me.

I checked the SDK path. The path does point to the SDK. Now, when you say outputting the apk’s to the SDK directory…do you mean when you save just before a build, to save the .apk file actually in the SDK folder?