找不到* apk,第一次运行但第二次运行

时间:2011-12-09 14:56:45

标签: android eclipse apk

我在网站上搜索过,但我找不到这个非常恼人的问题的确切解决方案。每次,我创建一个新的Android项目,它首次尝试使用带红色的消息运行它失败"无法鳍* apk!"但在第二次尝试时工作得很好,等等。任何人都可以帮助解决这个问题,因为我以前没有这个问题。我可以在第一次尝试时运行我的程序。

以下是我在控制台上获得的内容,但您可以看到它在第二次尝试时正常运行...

希望很快能在这里与你们在一起,并提前感谢。

我已经删除了Eclipse Indingo服务版本1    ADT r15在Windows 7终极机器上运行

控制台输出消息:

[2011-12-09 15:25:11 - Layout] ------------------------------
[2011-12-09 15:25:11 - Layout] Android Launch!
[2011-12-09 15:25:11 - Layout] adb is running normally.
[2011-12-09 15:25:11 - Layout] Could not find Layout.apk!
[2011-12-09 15:25:43 - Layout] ------------------------------
[2011-12-09 15:25:43 - Layout] Android Launch!
[2011-12-09 15:25:43 - Layout] adb is running normally.
[2011-12-09 15:25:43 - Layout] Performing com.delanation.lay.main activity launch
[2011-12-09 15:25:43 - Layout] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GingerBread'
[2011-12-09 15:25:43 - Layout] Uploading Layout.apk onto device 'emulator-5554'
[2011-12-09 15:25:44 - Layout] Installing Layout.apk...
[2011-12-09 15:25:47 - Layout] Success!
[2011-12-09 15:25:48 - Layout] Starting activity com.delanation.lay.main on device emulator-5554
[2011-12-09 15:25:49 - Layout] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.delanation.lay/.main }

LogCat:

=============================================

 *12-09 00:31:24.611: D/AndroidRuntime(6161): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-09 00:31:24.611: D/AndroidRuntime(6161): CheckJNI is ON
12-09 00:31:25.371: D/AndroidRuntime(6161): Calling main entry com.android.commands.pm.Pm
12-09 00:31:25.581: D/dalvikvm(380): GC_EXPLICIT freed 5K, 54% free 2539K/5511K, external 1625K/2137K, paused 74ms
12-09 00:31:25.581: W/ActivityManager(81): No content provider found for: 
12-09 00:31:25.643: W/ActivityManager(81): No content provider found for: 
12-09 00:31:25.661: D/PackageParser(81): Scanning package: /data/app/vmdl-1754418723.tmp
12-09 00:31:25.771: D/PackageManager(81): Scanning package com.delanation.lay
12-09 00:31:25.782: I/PackageManager(81): Unpacking native libraries for /data/app/com.delanation.lay-1.apk
12-09 00:31:25.870: D/installd(35): DexInv: --- BEGIN '/data/app/com.delanation.lay-1.apk' ---
12-09 00:31:26.021: D/dalvikvm(6170): DexOpt: load 32ms, verify+opt 15ms
12-09 00:31:26.051: D/installd(35): DexInv: --- END '/data/app/com.delanation.lay-1.apk' (success) ---
12-09 00:31:26.061: D/PackageManager(81):   Activities: com.delanation.lay.main
12-09 00:31:26.081: I/ActivityManager(81): Force stopping package com.delanation.lay uid=10042
12-09 00:31:26.391: I/installd(35): move /data/dalvik-cache/data@app@com.delanation.lay-1.apk@classes.dex -> /data/dalvik-cache/data@app@com.delanation.lay-1.apk@classes.dex
12-09 00:31:26.391: D/PackageManager(81): New package installed in /data/app/com.delanation.lay-1.apk
12-09 00:31:27.311: W/RecognitionManagerService(81): no available voice recognition services found
12-09 00:31:27.781: D/dalvikvm(81): GC_EXPLICIT freed 820K, 55% free 4739K/10375K, external 3933K/4430K, paused 124ms
12-09 00:31:27.801: D/AndroidRuntime(6161): Shutting down VM
12-09 00:31:27.811: D/dalvikvm(6161): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 1ms+1ms
12-09 00:31:27.831: D/jdwp(6161): Got wake-up signal, bailing out of select
12-09 00:31:27.831: D/dalvikvm(6161): Debugger has detached; object registry had 1 entries
12-09 00:31:27.861: I/dalvikvm(6161): JNI: AttachCurrentThread (from ???.???)
12-09 00:31:27.861: I/AndroidRuntime(6161): NOTE: attach of thread 'Binder Thread #3' failed
12-09 00:31:28.501: D/AndroidRuntime(6175): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-09 00:31:28.501: D/AndroidRuntime(6175): CheckJNI is ON
12-09 00:31:29.251: D/AndroidRuntime(6175): Calling main entry com.android.commands.am.Am
12-09 00:31:29.281: I/ActivityManager(81): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.delanation.lay/.main } from pid 6175
12-09 00:31:29.531: D/AndroidRuntime(6175): Shutting down VM
12-09 00:31:29.531: I/ActivityManager(81): Start proc com.delanation.lay for activity com.delanation.lay/.main: pid=6184 uid=10042 gids={}
12-09 00:31:29.551: D/dalvikvm(6175): GC_CONCURRENT freed 102K, 69% free 320K/1024K, external 0K/0K, paused 1ms+1ms
12-09 00:31:29.591: D/jdwp(6175): Got wake-up signal, bailing out of select
12-09 00:31:29.591: D/dalvikvm(6175): Debugger has detached; object registry had 1 entries
12-09 00:31:29.622: I/AndroidRuntime(6175): NOTE: attach of thread 'Binder Thread #3' failed
12-09 00:31:30.821: I/ActivityManager(81): Displayed com.delanation.lay/.main: +1s304ms
12-09 00:31:35.971: D/dalvikvm(380): GC_EXPLICIT freed 6K, 54% free 2537K/5511K, external 1625K/2137K, paused 59ms
12-09 00:31:36.911: I/ActivityManager(81): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher } from pid 81
12-09 00:31:37.161: I/ActivityManager(81): No longer want com.android.inputmethod.latin (pid 2695): hidden #16
12-09 00:31:42.611: D/dalvikvm(393): GC_EXPLICIT freed 3K, 55% free 2532K/5511K, external 1625K/2137K, paused 70ms
12-09 00:31:47.641: D/dalvikvm(290): GC_EXPLICIT freed 8K, 55% free 2591K/5703K, external 1625K/2137K, paused 76ms
12-09 00:33:38.631: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol
12-09 00:37:29.201: V/BackupManagerService(81): Backup requested but nothing pending
12-09 00:38:38.681: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol
12-09 00:43:38.681: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol*

1 个答案:

答案 0 :(得分:1)

在eclipse中选择'Window' - &gt;然后'首选项'展开'Android'子树并选择'Build'。

在“构建设置”下,如果您启用了“跳过包装并解除导出或启动...”,请尝试禁用它以查看是否能解决问题。