Build Path Errors

by cdnyny » Mon, 14 Dec 2009 06:08:44 GMT

Sponsored Links
 When I try and run the canonical HelloWorld app, I get the following
error right after trying to create the project: "The project cannot be
built until build path errors are resolved". I tried Project/Clean and
the Window/Other Perspective/DDMS route, but to no avail. Closing and
restarting Eclipse did not solve the problem.

The SDK location is set as the folder that contains the "platforms"
sub-folder. I am running on XP, and have set the Target Name as
Android 2.0.1. I have tried deleting and redoing the entire procedure
a few times, but get this above error all the time. Any thoughts?

Thanks in advance.


Other Threads

1. Custom Account / Sync adapter: inability to edit contacts?


When creating a custom account and/or sync adapter, raw_contacts that
belong to your custom account can be created.

But it looks like that they then cannot be edited with the Contact

Is this a known limitation, or a problem in my code?

Thanks a lot for your help.



2. IllegalStateException with ExpandableListActivity and SimpleCursorTreeAdapter

Using and from, I have written a simple application
that contains a content provider serving two tables in an sqlite
database and a display activity that uses my ExpandableListActivity
subclass. I am using my own layouts for the ExpandableList, and the
group and child layouts. The contents of the database are being
displayed properly in the display activity, and the groups collapse
and expand fine. However, if I expand a group, and click on a child to
select it, I get the following stack dump:

Thread [<3> main] (Suspended (exception IllegalStateException))
        CursorWindow.getLong(int, int) line: 331
        SQLiteCursor(AbstractWindowedCursor).getLong(int) line: 108
        ContentResolver$CursorWrapperInner(CursorWrapper).getLong(int) line:
        CursorTreeAdapter$MyCursorHelper.getId(int) line: 435
$SetListExpandableListAdapter(CursorTreeAdapter).getChildId(int, int)
line: 172
        ExpandableListConnector.getItemId(int) line: 428
        AbsListView$ line: 1635
        ViewRoot(Handler).handleCallback(Message) line: 587
        ViewRoot(Handler).dispatchMessage(Message) line: 92
        Looper.loop() line: 123
        ActivityThread.main(String[]) line: 4203
        Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
        Method.invoke(Object, Object...) line: 521
        ZygoteInit$ line: 791
        ZygoteInit.main(String[]) line: 549
        NativeStart.main(String[]) line: not available [native method]

My SimpleCursorTreeAdapter:

public class SetListExpandableListAdapter extends
SimpleCursorTreeAdapter {

        public SetListExpandableListAdapter(Context context, Cursor
cursor, int groupLayout,
                int childLayout, String[] groupFrom, int[] groupTo,
String[] childrenFrom,
                int[] childrenTo) {
            super(context, cursor, groupLayout, groupFrom, groupTo,
childLayout, childrenFrom,
        protected Cursor getChildrenCursor(Cursor setListCursor) {
            Uri.Builder builder =
            Uri songsUri =;
            return managedQuery(songsUri, mSongProjection,
                        "SETLIST = '" +
Long.toString(setListCursor.getLong(mSetListIdColumnIndex)) + "'",
                        null, null);

I've yet to be able to set a breakpoint in my code that is reached
before the IllegalStateException gets thrown. Looks to me that I'm
doing what the examples do, but apparently there is something I'm

Some help would be greatly appreciated.


3. Getting platform files from command line

4. android Java code for form action

5. Problem with the picasa api

6. AppWidget design pattern with SQLite database

7. Question about NDK