For the setListAdapter()
call, place nestedObject.this
with just nestedObject
.
The first form attempts to qualify the this
pointer with a class name but nestedObject
is an object reference, not a class name. You refer to other objects with the object reference and not with this
.
For the ArrayAdapter
constructor, pass in a valid Context
. Since the class is a static
inner class, it doesn't have access to the containing class. You'll need to pass in a Context
such as your activity reference as an argument to the DownloadWebPageTask
. For example:
public static class DownloadWebPageTask extends AsyncTask<List<String>, Void, List<String>> {
private Context mContext;
DownloadWebPageTask(Context context) {
mContext = context;
}
// now use mContext where a context is needed
(Note that holding onto an Activity
reference like this can lead to significant memory leaks. But let's fix your build problems first. There are also many other problems in your code - interactively fixing them all is beyond the scope what SO questions are for.)