Debugging with Eclipse

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Debugging with Eclipse

Postby Lyndon » Tue Jan 12, 2010 9:02 pm

Hi

I am an experienced Java web developer and have been using Eclipse for
about 5 years.

I recently thought I'd give Android a go and so I set up Galileo with
the Android ADK.

I can get the example apps and widgets working no problem but...

I cannot get the Eclipse debugger to work at all.

I have followed the instructions and let the 'Debug as...' process
start the AVD and I have set breakpoints but I can never get the
process to stop on a breakpoint.

It's very strange. And very frustrating.

Also, I have Logcat working but quite often that stops showing
anything too.

Is the ADK buggy?
Regards

Lyndon
Lyndon
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 12, 2010 12:52 pm

Top

Postby wjspoel » Tue Jan 12, 2010 10:20 pm

The ADK isn't buggy at my side... have you added android:debuggable="true" to you manifest.xml?

So it should look something like this:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.      package="your.package.name"
  7.  
  8.      android:versionCode="1"
  9.  
  10.      android:versionName="1.0">
  11.  
  12.     <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
  13.  
  14.         <activity android:name=".activity"
  15.  
  16.                  android:label="@string/app_name">
  17.  
  18.             <intent-filter>
  19.  
  20.                 <action android:name="android.intent.action.MAIN" />
  21.  
  22.                 <category android:name="android.intent.category.LAUNCHER" />
  23.  
  24.             </intent-filter>
  25.  
  26.         </activity>
  27.  
  28.     </application>
  29.  
  30.     <uses-sdk android:minSdkVersion="5" />
  31.  
  32. </manifest>
  33.  
  34.  
Parsed in 0.003 seconds, using GeSHi 1.0.8.4
wjspoel
Junior Developer
Junior Developer
 
Posts: 18
Joined: Thu Dec 24, 2009 10:40 pm

Postby Lyndon » Tue Jan 12, 2010 11:14 pm

I do have android:debuggable="true" in my manifest xml

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest
  5.  
  6.  xmlns:android="http://schemas.android.com/apk/res/android"
  7.  
  8.  package="net.infomediauk.android"
  9.  
  10.  android:versionCode="1"
  11.  
  12.  android:versionName="1.0">
  13.  
  14.   <application
  15.  
  16.    android:icon="@drawable/icon"
  17.  
  18.    android:label="@string/app_name"
  19.  
  20.    android:debuggable="true">
  21.  
  22.     <activity
  23.  
  24.      android:name=".WebServiceWidgetConfigure">
  25.  
  26.       <intent-filter>
  27.  
  28.         <action
  29.  
  30.          android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
  31.  
  32.       </intent-filter>
  33.  
  34.     </activity>
  35.  
  36.     <!-- Broadcast Receiver that will process AppWidget updates -->
  37.  
  38.     <receiver
  39.  
  40.      android:name=".WebServiceWidget"
  41.  
  42.      android:label="@string/widget_name">
  43.  
  44.       <intent-filter>
  45.  
  46.         <action
  47.  
  48.          android:name="android.appwidget.action.APPWIDGET_UPDATE" />
  49.  
  50.       </intent-filter>
  51.  
  52.       <meta-data
  53.  
  54.        android:name="android.appwidget.provider"
  55.  
  56.        android:resource="@xml/web_service_widget" />
  57.  
  58.     </receiver>
  59.  
  60.     <!-- Service to perform web API queries -->
  61.  
  62.     <service
  63.  
  64.      android:name=".WebServiceWidget$UpdateService" />
  65.  
  66.   </application>
  67.  
  68.   <uses-permission
  69.  
  70.    android:name="android.permission.INTERNET" />
  71.  
  72.   <uses-sdk
  73.  
  74.    android:minSdkVersion="4" />
  75.  
  76. </manifest>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


I can debug stand-alone Java programs fine but nothing Android.

Any more ideas?
Regards

Lyndon
Lyndon
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 12, 2010 12:52 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 10 guests