5

在问这个问题之前,我搜索并找到了以下链接:
MyFirstApp installed on emulator but can't launch it
Android app won't open after I install. 但它可以在模拟器中运行
Android 应用程序不在模拟器上启动

他们都没有解决我的问题。

这是我的第一个应用程序,我将它创建为一个新的 androidProject。所以代码没有任何问题。我使用 linux,我的控制台显示以下内容:

[2013-05-30 14:06:36 - Hello] Android Launch!
[2013-05-30 14:06:36 - Hello] adb is running normally.
[2013-05-30 14:06:36 - Hello] Performing com.example.hello.MainActivity activity launch
[2013-05-30 14:06:36 - Hello] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-05-30 14:06:39 - Hello] Uploading Hello.apk onto device 'emulator-5554'
[2013-05-30 14:06:40 - Hello] Installing Hello.apk...
[2013-05-30 14:07:26 - Hello] Success!
[2013-05-30 14:07:27 - Hello] Starting activity com.example.hello.MainActivity on device emulator-5554

UPDATE 1
当我在手机中运行项目时,应用程序跑了出来,但没有在模拟器中运行。为什么?

UPDATE 2
等待了 15 分钟(在控制台消息结束后),但没有解决我的问题。

UPDATE 3
我也测试了其他一些项目,但问题还没有得到解决。

UPDATE 4
Logcat 消息 -

0: I/ActivityManager(297): No longer want android.process.media (pid 585): empty for 1809s
0: I/ActivityManager(297): No longer want com.android.deskclock (pid 680): empty for 1809s
0: I/ActivityManager(297): No longer want com.android.settings (pid 810): empty for 1810s
0: D/ExchangeService(768): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false
0: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
0: D/ExchangeService(768): !!! Email application not found; stopping self
0: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
0: E/ActivityThread(768): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d40c68 that was originally bound here
0: E/ActivityThread(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d40c68 that was originally bound here
0: E/ActivityThread(768):   at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
0: E/ActivityThread(768):   at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
0: E/ActivityThread(768):   at android.app.ContextImpl.bindService(ContextImpl.java:1418)
0: E/ActivityThread(768):   at android.app.ContextImpl.bindService(ContextImpl.java:1407)
0: E/ActivityThread(768):   at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
0: E/ActivityThread(768):   at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:10:32.895: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:10:32.895: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:10:32.895: E/ActivityThread(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:10:32.895: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:10:32.895: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:10:32.895: E/ActivityThread(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:10:32.895: E/ActivityThread(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:10:32.895: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:10:32.895: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:10:32.895: E/ActivityThread(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:10:33.685: E/StrictMode(768): null
06-04 17:10:33.685: E/StrictMode(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d40c68 that was originally bound here
06-04 17:10:33.685: E/StrictMode(768):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-04 17:10:33.685: E/StrictMode(768):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-04 17:10:33.685: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-04 17:10:33.685: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-04 17:10:33.685: E/StrictMode(768):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:10:33.685: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:10:33.685: E/StrictMode(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:10:33.685: E/StrictMode(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:10:33.685: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:10:33.685: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:10:33.685: E/StrictMode(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:10:33.795: W/ActivityManager(297): Unbind failed: could not find connection for android.os.BinderProxy@40fa9518
06-04 17:10:34.365: D/dalvikvm(768): GC_CONCURRENT freed 403K, 19% free 2486K/3068K, paused 106ms+73ms, total 1356ms
06-04 17:10:36.205: D/AndroidRuntime(1507): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 17:10:36.215: D/AndroidRuntime(1507): CheckJNI is ON
06-04 17:10:36.654: D/dalvikvm(1507): Trying to load lib libjavacore.so 0x0
06-04 17:10:36.755: D/dalvikvm(1507): Added shared lib libjavacore.so 0x0
06-04 17:10:40.265: D/AndroidRuntime(1514): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 17:10:40.275: D/AndroidRuntime(1514): CheckJNI is ON
06-04 17:10:40.635: D/dalvikvm(1514): Trying to load lib libjavacore.so 0x0
06-04 17:10:40.705: D/dalvikvm(1514): Added shared lib libjavacore.so 0x0
06-04 17:10:40.944: D/dalvikvm(1514): Trying to load lib libnativehelper.so 0x0
06-04 17:10:40.944: D/dalvikvm(1514): Added shared lib libnativehelper.so 0x0
06-04 17:10:47.597: D/AndroidRuntime(1514): Calling main entry com.android.commands.pm.Pm
06-04 17:10:47.815: I/ActivityManager(297): No longer want com.android.providers.calendar (pid 793): empty for 1805s
06-04 17:10:47.865: I/ActivityManager(297): No longer want com.android.calendar (pid 837): empty for 1805s
06-04 17:10:48.374: W/ActivityManager(297): No content provider found for permission revoke: file:///data/local/tmp/DatabaseActivity.apk
06-04 17:10:48.545: W/ActivityManager(297): No content provider found for permission revoke: file:///data/local/tmp/DatabaseActivity.apk
06-04 17:10:48.585: I/PackageManager(297): Copying native libraries to /data/app-lib/vmdl-1422685739
06-04 17:10:50.044: I/PackageManager(297): Removing non-system package:com.kamalan
06-04 17:10:50.054: I/ActivityManager(297): Force stopping package com.kamalan appid=10049 user=-1
06-04 17:10:51.095: I/PackageManager(297): Package com.kamalan codePath changed from /data/app/com.kamalan-2.apk to /data/app/com.kamalan-1.apk; Retaining data and using new
06-04 17:10:51.216: I/PackageManager(297): Running dexopt on: com.kamalan
06-04 17:10:54.445: D/dalvikvm(1528): DexOpt: load 553ms, verify+opt 1914ms, 285396 bytes
06-04 17:10:54.525: I/ActivityManager(297): Force stopping package com.kamalan appid=10049 user=-1
06-04 17:10:54.565: W/PackageManager(297): Code path for pkg : com.kamalan changing from /data/app/com.kamalan-2.apk to /data/app/com.kamalan-1.apk
06-04 17:10:54.605: W/PackageManager(297): Resource path for pkg : com.kamalan changing from /data/app/com.kamalan-2.apk to /data/app/com.kamalan-1.apk
06-04 17:10:55.605: D/dalvikvm(297): GC_CONCURRENT freed 637K, 32% free 5428K/7980K, paused 65ms+105ms, total 963ms
06-04 17:10:56.954: D/PackageManager(297): New package installed in /data/app/com.kamalan-1.apk
06-04 17:10:58.055: I/ActivityManager(297): Force stopping package com.kamalan appid=10049 user=0
06-04 17:10:58.205: D/dalvikvm(504): WAIT_FOR_CONCURRENT_GC blocked 1ms
06-04 17:10:59.014: D/dalvikvm(444): GC_EXPLICIT freed 155K, 65% free 4400K/12456K, paused 40ms+97ms, total 701ms
06-04 17:10:59.885: I/InputReader(297): Reconfiguring input devices.  changes=0x00000010
06-04 17:11:00.225: W/ContextImpl(1112): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1352 android.content.ContextWrapper.startService:450 android.content.ContextWrapper.startService:450 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2376 
06-04 17:11:00.345: D/dalvikvm(504): GC_EXPLICIT freed 142K, 13% free 2691K/3088K, paused 60ms+122ms, total 2139ms
06-04 17:11:01.338: I/InputReader(297): Reconfiguring input devices.  changes=0x00000010
06-04 17:11:10.726: W/InputMethodManagerService(297): Found no subtypes in a system IME: com.android.inputmethod.pinyin
06-04 17:11:12.735: D/dalvikvm(444): GC_CONCURRENT freed 482K, 64% free 4488K/12456K, paused 48ms+114ms, total 688ms
06-04 17:11:15.934: D/dalvikvm(297): GC_EXPLICIT freed 734K, 33% free 5378K/7980K, paused 1139ms+211ms, total 8937ms
06-04 17:11:16.195: D/AndroidRuntime(1514): Shutting down VM
06-04 17:11:16.335: D/dalvikvm(1514): GC_CONCURRENT freed 91K, 17% free 459K/552K, paused 4ms+18ms, total 99ms
06-04 17:11:16.365: D/dalvikvm(1514): Debugger has detached; object registry had 1 entries
06-04 17:11:18.075: D/ExchangeService(768): Received deviceId from Email app: null
06-04 17:11:18.075: D/ExchangeService(768): !!! deviceId unknown; stopping self and retrying
06-04 17:11:20.495: I/Choreographer(444): Skipped 101 frames!  The application may be doing too much work on its main thread.
06-04 17:11:20.844: D/AndroidRuntime(1540): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 17:11:20.864: D/AndroidRuntime(1540): CheckJNI is ON
06-04 17:11:21.335: I/Choreographer(444): Skipped 34 frames!  The application may be doing too much work on its main thread.
06-04 17:11:21.665: D/dalvikvm(1540): Trying to load lib libjavacore.so 0x0
06-04 17:11:21.816: D/dalvikvm(1540): Added shared lib libjavacore.so 0x0
06-04 17:11:22.265: D/dalvikvm(1540): Trying to load lib libnativehelper.so 0x0
06-04 17:11:22.265: D/dalvikvm(1540): Added shared lib libnativehelper.so 0x0
06-04 17:11:23.805: D/ExchangeService(768): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false
06-04 17:11:24.305: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-04 17:11:24.385: W/RecognitionManagerService(297): no available voice recognition services found for user 0
06-04 17:11:24.427: D/ExchangeService(768): !!! Email application not found; stopping self
06-04 17:11:24.716: E/ActivityThread(768): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d577c0 that was originally bound here
06-04 17:11:24.716: E/ActivityThread(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d577c0 that was originally bound here
06-04 17:11:24.716: E/ActivityThread(768):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-04 17:11:24.716: E/ActivityThread(768):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-04 17:11:24.716: E/ActivityThread(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-04 17:11:24.716: E/ActivityThread(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-04 17:11:24.716: E/ActivityThread(768):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:11:24.716: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:11:24.716: E/ActivityThread(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:11:24.716: E/ActivityThread(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:11:24.716: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:11:24.716: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:11:24.716: E/ActivityThread(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:11:24.785: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-04 17:11:24.859: E/StrictMode(768): null
06-04 17:11:24.859: E/StrictMode(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d577c0 that was originally bound here
06-04 17:11:24.859: E/StrictMode(768):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-04 17:11:24.859: E/StrictMode(768):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-04 17:11:24.859: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-04 17:11:24.859: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-04 17:11:24.859: E/StrictMode(768):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:11:24.859: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:11:24.859: E/StrictMode(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:11:24.859: E/StrictMode(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:11:24.859: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:11:24.859: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:11:24.859: E/StrictMode(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:11:24.900: W/ActivityManager(297): Unbind failed: could not find connection for android.os.BinderProxy@40ce9800
06-04 17:11:38.775: W/ProcessStats(297): Skipping unknown process pid 1547
06-04 17:12:09.826: D/ExchangeService(768): Received deviceId from Email app: null
06-04 17:12:09.826: D/ExchangeService(768): !!! deviceId unknown; stopping self and retrying
06-04 17:12:15.018: D/ExchangeService(768): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false
06-04 17:12:15.085: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-04 17:12:15.192: D/ExchangeService(768): !!! Email application not found; stopping self
06-04 17:12:15.435: W/ActivityManager(297): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-04 17:12:15.571: E/ActivityThread(768): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5f4b0 that was originally bound here
06-04 17:12:15.571: E/ActivityThread(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5f4b0 that was originally bound here
06-04 17:12:15.571: E/ActivityThread(768):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-04 17:12:15.571: E/ActivityThread(768):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-04 17:12:15.571: E/ActivityThread(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-04 17:12:15.571: E/ActivityThread(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-04 17:12:15.571: E/ActivityThread(768):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:12:15.571: E/ActivityThread(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:12:15.571: E/ActivityThread(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:12:15.571: E/ActivityThread(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:12:15.571: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:12:15.571: E/ActivityThread(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:12:15.571: E/ActivityThread(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:12:15.999: E/StrictMode(768): null
06-04 17:12:15.999: E/StrictMode(768): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5f4b0 that was originally bound here
06-04 17:12:15.999: E/StrictMode(768):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-04 17:12:15.999: E/StrictMode(768):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-04 17:12:15.999: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-04 17:12:15.999: E/StrictMode(768):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-04 17:12:15.999: E/StrictMode(768):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-04 17:12:15.999: E/StrictMode(768):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-04 17:12:15.999: E/StrictMode(768):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-04 17:12:15.999: E/StrictMode(768):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-04 17:12:15.999: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-04 17:12:15.999: E/StrictMode(768):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-04 17:12:15.999: E/StrictMode(768):  at java.lang.Thread.run(Thread.java:856)
06-04 17:12:16.267: W/ActivityManager(297): Unbind failed: could not find connection for android.os.BinderProxy@40fc18e0

然后我阅读了以下链接
Android emulator spams logcat with “Service com.android.exchange.ExchangeService has leaked ServiceConnection ... that original bound here
Android “No content provider found for permission revoke”
第一个链接对我有用。但第二个链接没用所以我的Logcat
显示

06-04 18:15:04.209: D/AndroidRuntime(2671): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 18:15:04.209: D/AndroidRuntime(2671): CheckJNI is ON
06-04 18:15:04.615: D/dalvikvm(2671): Trying to load lib libjavacore.so 0x0
06-04 18:15:04.705: D/dalvikvm(2671): Added shared lib libjavacore.so 0x0
06-04 18:15:05.025: D/dalvikvm(2671): Trying to load lib libnativehelper.so 0x0
06-04 18:15:05.025: D/dalvikvm(2671): Added shared lib libnativehelper.so 0x0
06-04 18:15:11.066: D/AndroidRuntime(2676): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 18:15:11.066: D/AndroidRuntime(2676): CheckJNI is ON
06-04 18:15:11.415: D/dalvikvm(2676): Trying to load lib libjavacore.so 0x0
06-04 18:15:11.474: D/dalvikvm(2676): Added shared lib libjavacore.so 0x0
06-04 18:15:11.725: D/dalvikvm(2676): Trying to load lib libnativehelper.so 0x0
06-04 18:15:11.725: D/dalvikvm(2676): Added shared lib libnativehelper.so 0x0
06-04 18:15:16.085: D/AndroidRuntime(2676): Calling main entry com.android.commands.pm.Pm
06-04 18:15:16.435: W/ActivityManager(297): No content provider found for permission revoke: file:///data/local/tmp/Hello.apk
06-04 18:15:16.625: W/ActivityManager(297): No content provider found for permission revoke: file:///data/local/tmp/Hello.apk
06-04 18:15:16.656: I/PackageManager(297): Copying native libraries to /data/app-lib/vmdl1402094020
06-04 18:15:17.626: I/PackageManager(297): Removing non-system package:com.example.hello
06-04 18:15:17.626: I/ActivityManager(297): Force stopping package com.example.hello appid=10047 user=-1
06-04 18:15:18.254: I/PackageManager(297): Package com.example.hello codePath changed from /data/app/com.example.hello-2.apk to /data/app/com.example.hello-1.apk; Retaining data and using new
06-04 18:15:18.334: I/PackageManager(297): Running dexopt on: com.example.hello
06-04 18:15:24.745: D/dalvikvm(2689): DexOpt: load 1310ms, verify+opt 3731ms, 790652 bytes
06-04 18:15:24.865: W/PackageManager(297): Code path for pkg : com.example.hello changing from /data/app/com.example.hello-2.apk to /data/app/com.example.hello-1.apk
06-04 18:15:24.877: I/ActivityManager(297): Force stopping package com.example.hello appid=10047 user=-1
06-04 18:15:24.925: W/PackageManager(297): Resource path for pkg : com.example.hello changing from /data/app/com.example.hello-2.apk to /data/app/com.example.hello-1.apk
06-04 18:15:25.565: D/PackageManager(297): New package installed in /data/app/com.example.hello-1.apk
06-04 18:15:26.335: I/ActivityManager(297): Force stopping package com.example.hello appid=10047 user=0
06-04 18:15:26.958: D/dalvikvm(2485): GC_EXPLICIT freed 139K, 13% free 2688K/3072K, paused 40ms+51ms, total 560ms
06-04 18:15:27.895: I/InputReader(297): Reconfiguring input devices.  changes=0x00000010
06-04 18:15:28.144: D/dalvikvm(444): GC_EXPLICIT freed 136K, 66% free 4474K/13056K, paused 47ms+478ms, total 1533ms
06-04 18:15:28.535: W/ContextImpl(1112): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1352 android.content.ContextWrapper.startService:450 android.content.ContextWrapper.startService:450 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2376 
06-04 18:15:28.745: D/dalvikvm(297): GC_CONCURRENT freed 767K, 27% free 5857K/7980K, paused 556ms+164ms, total 1945ms
06-04 18:15:31.248: I/InputReader(297): Reconfiguring input devices.  changes=0x00000010
06-04 18:15:33.840: W/InputMethodManagerService(297): Found no subtypes in a system IME: com.android.inputmethod.pinyin
06-04 18:15:38.765: D/dalvikvm(297): GC_EXPLICIT freed 380K, 28% free 5814K/7980K, paused 1380ms+200ms, total 5730ms
06-04 18:15:39.234: D/AndroidRuntime(2676): Shutting down VM
06-04 18:15:39.459: D/dalvikvm(2676): GC_CONCURRENT freed 91K, 17% free 459K/552K, paused 7ms+5ms, total 146ms
06-04 18:15:39.485: D/jdwp(2676): Got wake-up signal, bailing out of select
06-04 18:15:39.485: D/dalvikvm(2676): Debugger has detached; object registry had 1 entries
06-04 18:15:45.205: D/dalvikvm(444): GC_CONCURRENT freed 527K, 66% free 4527K/13056K, paused 70ms+155ms, total 791ms
06-04 18:15:45.314: D/AndroidRuntime(2701): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-04 18:15:45.345: D/AndroidRuntime(2701): CheckJNI is ON
06-04 18:15:46.545: I/Choreographer(444): Skipped 326 frames!  The application may be doing too much work on its main thread.
06-04 18:15:47.335: I/Choreographer(444): Skipped 58 frames!  The application may be  doing too much work on its main thread.
06-04 18:15:47.625: W/RecognitionManagerService(297): no available voice recognition services found for user 0

我很累修复它。
我的清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.com.hello"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.hello.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>  

我的 emulator4.2.2 的设置

avd.ini.encoding=ISO-8859-1
hw.dPad=no
hw.lcd.density=160
hw.cpu.arch=arm
hw.device.hash=-1537072293
disk.dataPartition.size=200M
skin.path=1024x600
skin.dynamic=yes
hw.cpu.model=cortex-a8
hw.keyboard=yes
hw.ramSize=512
hw.device.manufacturer=Generic
hw.sdCard=no
hw.mainKeys=no
hw.accelerometer=yes
skin.name=1024x600
abi.type=armeabi-v7a
hw.trackBall=no
hw.device.name=7in WSVGA (Tablet)
hw.battery=yes
hw.sensors.proximity=yes
image.sysdir.1=system-images/android-17/armeabi-v7a/
hw.sensors.orientation=yes
hw.audioInput=yes
hw.camera.front=none
hw.gps=yes
vm.heapSize=32
snapshot.present=true

感谢所有 ‍‍‍‍</p>

4

3 回答 3

1

首先你可以下载Android sdk
http://developer.android.com/sdk/index.html#download
之后你可以下载eclipse Juno下载并运行之后你可以下载所有文件并在你下载所有文件后添加一个新的安装adk all kit after lunch 你的程序在你的程序将在模拟器上运行之后,我认为你在做这个过程中犯了一些错误,仔细检查细节并尝试再次这样做。我会给你一个最好的链接,为你提供所有 android 应用程序信息。 http://developer.android.com/training/basics/firstapp/index.html

于 2013-06-08T08:20:59.527 回答
0

模拟器启动时从命令行尝试:

adb shell chmod 777 /data/local

然后尝试再次运行您的应用程序。
你的模拟器好像有问题。

于 2013-06-08T01:17:30.620 回答
0

尝试使用具有不同版本 sdk 和不同设置的不同 VM

于 2013-06-08T13:13:28.670 回答