App won't launch on the device
No matter what app I try, it won't launch on the device. It works perfectly on emulator, but when I try to launch it on the device, it'll get uploaded & installed and then "Starting activity on device " appears and nothing happens - it just sits there and does nothing. When I repeat the process, eventually it will launch (but it has to be repeated like 5-10 times), but all those activity launching proc开发者_如何学编程esses seem to remain active, which causes my phone to lag. I tried resetting adb, reinstalling Google USB drivers, nothing helps. I have a rooted phone, and custom ROM (it's called Darky's ROM 10.2) - could that be a problem maybe?
Sometimes it takes a long time to install and run, and ADB times out. Go to preferences in Eclipse, then to Android -> DDMS -> ADB connection time out (ms), and set it to something like 30000
You can try many things:
Compile and run a sample app on handset, does it run or not? If it doesnt then there may be a compilation environment (your PC) issue, signing or something else.
Download a free app from marketplace and see if you can run it.
Is this a standard Android phone or a rooted one? if its rooted then try on a standard handet.
Before installing do "adb kill-server" and then "adb start-server" to restart the adb. This may not be useful, but, just in case.
After installing the app, can you see it in Settings -> Applications -> Manage Applications menu?
Try a hard power cycle, by removing the data cable/charger and removing the battery for 10 seconds.
Also ensure that the emulator had the same screen dimensions as the handset you are testing on.
Attach Logcat and see what shows up there.
These tests will give you better idea of what is happening.
精彩评论