简体   繁体   English

应用无法在设备上启动

[英]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 processes seem to remain active, which causes my phone to lag. 当我重复该过程时,最终它将启动(但必须重复进行5到10次),但是所有这些活动启动过程似乎都保持活动状态,这会导致我的手机滞后。 I tried resetting adb, reinstalling Google USB drivers, nothing helps. 我尝试重置adb,重新安装Google USB驱动程序,没有任何帮助。 I have a rooted phone, and custom ROM (it's called Darky's ROM 10.2) - could that be a problem maybe? 我有一部扎根的手机和自定义ROM(称为Darky的ROM 10.2)-可能是个问题吗?

Sometimes it takes a long time to install and run, and ADB times out. 有时安装和运行需要很长时间,并且ADB超时。 Go to preferences in Eclipse, then to Android -> DDMS -> ADB connection time out (ms), and set it to something like 30000 转到Eclipse中的首选项,然后转到Android-> DDMS-> ADB连接超时(ms),并将其设置为30000

You can try many things: 您可以尝试许多事情:

  1. 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. 如果没有,则可能是编译环境(您的PC)问题,签名或其他问题。

  2. Download a free app from marketplace and see if you can run it. 从市场上下载免费的应用程序,看看是否可以运行它。

  3. Is this a standard Android phone or a rooted one? 这是标准的Android手机还是扎根的手机? if its rooted then try on a standard handet. 如果扎根,则尝试使用标准手机。

  4. Before installing do "adb kill-server" and then "adb start-server" to restart the adb. 在安装之前,先执行“ adb kill-server”,然后再执行“ adb start-server”以重新启动adb。 This may not be useful, but, just in case. 这可能没有用,但以防万一。

  5. After installing the app, can you see it in Settings -> Applications -> Manage Applications menu? 安装应用程序后,可以在“设置”->“应用程序”->“管理应用程序”菜单中看到它吗?

  6. Try a hard power cycle, by removing the data cable/charger and removing the battery for 10 seconds. 拔掉数据线/充电器并取出电池10秒钟,以尝试重新启动电源。

  7. Also ensure that the emulator had the same screen dimensions as the handset you are testing on. 还要确保仿真器的屏幕尺寸与您要测试的手机相同。

  8. Attach Logcat and see what shows up there. 附加Logcat并查看在那里显示的内容。

These tests will give you better idea of what is happening. 这些测试将使您对正在发生的事情有更好的了解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM