我在以下行中收到“此令牌后预期的令牌变量声明器上的语法错误”
listAq = new AQuery(this);
这是我的完整代码
package com.example.test;
import org.json.JSONObject;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import com.androidquery.AQuery;
public class TestActivity extends Activity {
private AQuery aq;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
listAq = new AQuery(this);
ArrayAdapter<JSONObject> aa = new ArrayAdatper<JSONObject>(this, R.layout.activity_main, items){
@Override
public View getView(int position, View convertView, ViewGroup parent){
if(convertView == null){
convertView = getLayoutInflater().inflate(R.layout.activity_main, null);
}
JSONObject jo = getItem(position);
AQuery aq = listAq.recycle(convertView);
aq.id(R.id.name).text(jo.optString("titleNoFormating", "No Title"));
aq.id(R.id.meta).text(jo.optString("publisher", ""));
String tb = jo.optJSONObject("image").optString("tbUrl");
aq.id(R.id.tb).progress(R.id.progress).image(tb,true, true,0,0,null,AQuery.FADE_IN_NETWORK,1.0f);
return convertView;
}
};
}