2012-09-25 99 views
3

從eclipse啓動模擬器後,我啓動我的練習應用程序,在調試下運行。每次控制檯說應用程序已加載並正在設備上啓動,但沒有任何事情發生。調試會話永遠不會啓動。仿真器上的「等待調試器」的警報消息從不顯示。我稍後檢查並看到該應用程序已成功加載,並且可以從模擬器運行,但沒有調試器。在這個過程中是否有某些東西缺失,是否有某種標誌設置debug = true的地方?任何人都可以提供建議嗎?android eclipse調試器永遠不會啓動

我的清單文件是:

<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) } 
+0

是否顯示ddms,對您的進程名稱顯示綠色圖標? – nandeesh

+0

哪裏?進程名稱不會顯示在DDMS的屏幕(選項卡)上。在調試器中,它只顯示在帶有單詞[android應用程序]的淺色方形圖標旁邊的頂部。 – tonytye

回答

2

要開始調試:

  1. 你應該去ddms
  2. 選擇你的應用程序的過程
  3. 點擊一個貪婪的錯誤按鈕(之後這個錯誤應該出現在靠近過程)

enter image description here

您也應該檢查在AndroidManifest.xml應用程序的android:debuggable屬性設置爲true。