Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc in Eclipse failing to recognize packages

Thanks to this thread, I was able to get Javadoc links to work for my Android project within Eclipse on Windows. Specifically, "{@link android.widget.Toast}" is currently converted into a link to "http://d.android.com/reference/android/widget/Toast.html?is-external=true". I achieved this with the Javadoc option:

-linkoffline http://d.android.com/reference "file:/C:/Android/android-sdk-windows/docs/reference"

However, I get errors such as the following based on lines of my Java code (not the Javadoc comments):

 C:\Users\Ellen\workspace\TestableToast\src\edu\mills\cs180\HelloAndroid.java:5:  package android.view does not exist import android.view.View;                    ^  C:\Users\Ellen\workspace\TestableToast\src\edu\mills\cs180\HelloAndroid.java:6:  package android.view.View does not exist  import android.view.View.OnClickListener;                         ^  C:\Users\Ellen\workspace\TestableToast\src\edu\mills\cs180\HelloAndroid.java:8:  package android.widget does not exist import android.widget.Toast;                       ^  C:\Users\Ellen\workspace\TestableToast\src\edu\mills\cs180\HelloAndroid.java:10:  cannot find symbol symbol: class Activity  public class HelloAndroid extends Activity implements OnClickListener {                                   ^ 

How can I fix these references?

like image 898
Ellen Spertus Avatar asked Mar 04 '11 23:03

Ellen Spertus


1 Answers

This Works in Eclipse for me:

  1. Project --> generate Javadoc
  2. Go to "Configure Javadoc arguments."
  3. in VM options add "-bootclasspath /path/to/sdk/platforms/android-##/android.jar"
like image 106
Marcel D-B Avatar answered Oct 15 '22 04:10

Marcel D-B