android eclipse调试器永远不会启动

时间:2012-09-25 18:42:02

标签: android eclipse debugging

从eclipse启动模拟器后,我启动练习应用程序在调试下运行。每次控制台说应用程序已加载并在设备上启动,但什么都没发生。调试会话永远不会启动。模拟器上显示“等待调试器”的警报消息永远不会显示。我稍后检查并看到应用程序已成功加载,我可以从模拟器运行,但没有调试器。在这个过程中是否缺少某些东西,是否有某种标志设置在某处显示debug = true?有人可以提出建议吗?

我的清单文件是:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tryit1"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="15" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Tryit1Activity"
            android:label="@string/title_activity_tryit1" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application> </manifest>

如果这有帮助,这里是来自DDMS logcat的相关消息:

09-25 12:03:56.962: W/ActivityManager(694): No content provider found    for permission revoke: file:///data/local/tmp/tryit1.apk  
09-25 12:03:57.272: W/ActivityManager(694): No content provider found for    permission revoke: file:///data/local/tmp/tryit1.apk
09-25 12:04:00.830: I/PackageManager(694): Removing non-system package:com.example.tryit1 
09-25 12:04:00.865: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:01.893: I/PackageManager(694): Package com.example.tryit1 codePath changed from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk; Retaining data and using new 
09-25 12:04:01.981: I/PackageManager(694): Running dexopt on: com.example.tryit1 
09-25 12:04:05.004: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:05.043: W/PackageManager(694): Code path for pkg : com.example.tryit1 changing from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk 
09-25 12:04:05.111: W/PackageManager(694): Resource path for pkg : com.example.tryit1 changing from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk 
09-25 12:04:05.560: D/PackageManager(694): New package installed in /data/app/com.example.tryit1-2.apk 
09-25 12:04:06.007: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:08.161: D/BackupManagerService(694): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.tryit1 flg=0x8000010 (has extras) } 
09-25 12:04:08.800: D/BackupManagerService(694): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.tryit1 flg=0x8000010 (has extras) }

1 个答案:

答案 0 :(得分:2)

开始调试:

  1. 你应该去ddms
  2. 选择您的申请流程
  3. 点击贪婪错误按钮(之后,此错误应出现在您的流程附近)
  4. enter image description here

    您还应该检查AndroidManifest.xml中应用程序的android:debuggable属性是否设置为true。