- Home /
Hangs on "Pushing new content to device" when using "Build and Run" with android
I'm trying to develop a game for android but can't get my test environment to work consistently. Earlier today I was able to use the "build & run" button to test on my device with no problem, but now it hangs on "Pushing new content to device." I've left it like this for an hour without anything changing. Occasionally, Unity will freeze on "Trying to locate a suitable android device" too, requiring me to close Unity in the task manager.
I literally didn't change a thing between when it was working and when it wasn't. Anyone have any ideas? I'm testing on a Samsung Galaxy S III.
Things I've tried:
Switching USB ports (I have both 2.0 and 3.0 USB, this used to work but now it doesn't at all)
Restarting my computer (again, used to fix things, but not this time).
Restarting my android device
Restarting Unity
Developer Mode is turned on with USB debugging, and Always awake mode is on aswell
"Unknown sources" is also turned on.
My android device is connected as MTP, tried PTP with no difference.
Turned firewalls off
The Android SDK is installed and setup.
Sacrificing a Fly to Satan
So I put it down for about 3 hours and came back and miraculously, it started working again...once. Build & Run worked when I first started up unity, but making changes to the code caused the problem to happen again. I'm wondering if it's something to do with how I ter$$anonymous$$ate the program on my device. I'm using the following code to exit the program:
if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.Escape)) {
Application.Quit();
}
I was told that the "back" button on android devices can be accessed by using $$anonymous$$eyCode.Escape
Answer by he110me · Mar 12, 2014 at 12:55 AM
I think I found the Answer. I noticed that when i closed the application on my device, it wouldn't get deleted. I went to the application manager and deleted my game from the phone and tried using "Build and Run" and it worked! (But it still won't work if I use the button under build settings.)
TL,DR: Exit the application on your phone, look for it in your application manager, delete it, use "Build & Run" from the "File" dropdown menu.