利用bmob加载数据到listview上,出现问题,求解决啊

使用bmob的菜鸟,写了一个利用bmob把图文数据加载到listview的代码,图片文件是用的bmobfile,我是通过获取它的URL然后进行网络图片下载来加载图片的,但是运行出错了,求解决啊

adapter的代码:
public class ClassListAdapter extends BaseAdapter {
private Context mContext;
private LayoutInflater mInflater = null;// LayoutInflater作用是将layout的xml布局文件实例化为View类对象
private ArrayList mClassList = null; // 所选分类下的所有列表

public ClassListAdapter(Context context, ArrayList classList) {
setmContext(context);
mClassList = classList;
mInflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return mClassList.size();
}
@Override
public Object getItem(int position) {
return mClassList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}

public void refresh(ArrayList list) {
mClassList = list;

notifyDataSetChanged();
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {

ClassHolder classHodler;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.list_class_item, null);
classHodler = new ClassHolder();
classHodler.tvClassName = (TextView) convertView
.findViewById(R.id.tv_cn);
classHodler.tvDate = (TextView) convertView
.findViewById(R.id.tv_date);
classHodler.ivClassPic = (ImageView) convertView
.findViewById(R.id.class_pic);
convertView.setTag(classHodler);
} else {

classHodler = (ClassHolder) convertView.getTag();
}
classHodler.tvClassName.setText(mClassList.get(position).getCname());
classHodler.tvDate.setText(mClassList.get(position).getDate());

String url = mClassList.get(position).getCpic().getFileUrl();
classHodler.ivClassPic.setTag(url);
new ImageLoader().showImageByThread(classHodler.ivClassPic, url);
return convertView;
}

public Context getmContext() {
return mContext;
}

public void setmContext(Context mContext) {
this.mContext = mContext;
}

}
listactivity的代码:
public class ClassActivity extends Activity implements OnItemClickListener {
private static final String TAG = "ClassActivity";
private ListView classListView;
private ArrayList classList = new ArrayList();
private ClassListAdapter mClassListAdapter;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_class_all);
initView();
initEvent();
}

private void initEvent() {
// TODO Auto-generated method stub
mClassListAdapter = new ClassListAdapter(this, classList);
classListView.setAdapter(mClassListAdapter);
classListView.setOnItemClickListener(this);

getClassData();
}

private void initView() {
// TODO Auto-generated method stub
classListView = (ListView) findViewById(R.id.lv_class_all);
}

private void getClassData() {
// TODO Auto-generated method stub
BmobQuery query = new BmobQuery();
query.order("-updatedAt");
query.findObjects(this, new FindListener() {

@Override
public void onSuccess(final List object) {
classList = (ArrayList) object;
mClassListAdapter.refresh((ArrayList) classList);
mClassListAdapter.notifyDataSetChanged();
}

@Override
public void onError(String arg0) {
toast("获取数据失败了");
}
});
}

@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Intent toClassDetail = new Intent(ClassActivity.this,
ClassDetailActivity.class);
toClassDetail.putExtra("ClassName", classList.get(position).getCname());
toClassDetail.putExtra("ClassTeacherObjectId", classList.get(position)
.getTobjectid());
toClassDetail.putExtra("ClassDate", classList.get(position).getDate());
toClassDetail.putExtra("ClassTime", classList.get(position).getTime());
toClassDetail.putExtra("ClassInfo", classList.get(position).getCinfo());
toClassDetail.putExtra("ClassPic", classList.get(position).getCpic()
.getFileUrl());
startActivity(toClassDetail);
}

public void toast(String toast) {
Toast.makeText(this, toast, Toast.LENGTH_SHORT);
}

}
这是运行时报的错
05-19 04:26:48.082: W/Zygote(25337): mz_is_rooted false
05-19 04:26:48.088: I/art(25337): Late-enabling -Xcheck:jni
05-19 04:26:48.153: E/art(25337): Failed sending reply to debugger: Broken pipe
05-19 04:26:48.153: I/art(25337): Debugger is no longer active
05-19 04:26:48.386: I/art(25337): Background sticky concurrent mark sweep GC freed 1718(102KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 41MB/41MB, paused 8.769ms total 20.573ms
05-19 04:26:48.835: E/GED(25337): Failed to get GED Log Buf, err(0)
05-19 04:26:48.837: I/art(25337): Background partial concurrent mark sweep GC freed 36(1912B) AllocSpace objects, 0(0B) LOS objects, 7% free, 50MB/54MB, paused 6.827ms total 24.126ms
05-19 04:26:48.851: I/OpenGLRenderer(25337): Initialized EGL, version 1.4
05-19 04:26:48.851: W/OpenGLRenderer(25337): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
05-19 04:26:48.867: I/OpenGLRenderer(25337): Initializing program atlas...
05-19 04:26:53.154: W/IInputConnectionWrapper(25337): clearMetaKeyStates on inactive InputConnection
05-19 04:26:56.365: E/MPlugin(25337): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport
05-19 04:26:56.379: E/WifiManager(25337): mWifiServiceMessenger == null
05-19 04:26:56.409: I/System.out(25337): url:http://open.bmob.cn/7/login
05-19 04:26:56.415: D/libc-netbsd(25337): [getaddrinfo]: hostname=open.bmob.cn; servname=(null); cache_mode=(null), netid=0; mark=0
05-19 04:26:56.415: D/libc-netbsd(25337): [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
05-19 04:26:56.416: D/libc-netbsd(25337): [getaddrinfo]: hostname=open.bmob.cn; servname=(null); cache_mode=(null), netid=0; mark=0
05-19 04:26:56.416: D/libc-netbsd(25337): [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0
05-19 04:26:56.476: D/libc-netbsd(25337): getaddrinfo: open.bmob.cn get result from proxy >>
05-19 04:26:56.476: I/System.out(25337): propertyValue:true
05-19 04:26:56.478: I/System.out(25337): [CDS]connect[open.bmob.cn/123.59.85.59:80] tm:2
05-19 04:26:56.545: I/System.out(25337): [OkHttp] sendRequest>>
05-19 04:26:56.545: I/System.out(25337): [OkHttp] sendRequest<<
05-19 04:26:56.609: I/NetworkManagementSocketTagger(25337): untagSocket(39)
05-19 04:26:56.799: E/MPlugin(25337): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport
05-19 04:26:56.806: E/WifiManager(25337): mWifiServiceMessenger == null
05-19 04:26:56.820: I/System.out(25337): url:http://open.bmob.cn/7/find
05-19 04:26:56.849: I/System.out(25337): [CDS]EAGAIN in Recvfrom
05-19 04:26:56.849: I/System.out(25337): [CDS]read byte is 0
05-19 04:26:56.849: I/System.out(25337): [OkHttp] sendRequest>>
05-19 04:26:56.850: I/System.out(25337): [OkHttp] sendRequest<<
05-19 04:26:56.921: I/NetworkManagementSocketTagger(25337): untagSocket(39)
05-19 04:26:56.994: E/AndroidRuntime(25337): FATAL EXCEPTION: main
05-19 04:26:56.994: E/AndroidRuntime(25337): Process: com.keke.doexercise, PID: 25337
05-19 04:26:56.994: E/AndroidRuntime(25337): g.Hamlet: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 176
05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$This.Code(SourceFile:176)
05-19 04:26:56.994: E/AndroidRuntime(25337): at g.Tempest.Code(SourceFile:803)
05-19 04:26:56.994: E/AndroidRuntime(25337): at g.Tempest.Code(SourceFile:717)
05-19 04:26:56.994: E/AndroidRuntime(25337): at cn.bmob.v3.requestmanager.thing$3.Code(SourceFile:1)
05-19 04:26:56.994: E/AndroidRuntime(25337): at cn.bmob.v3.requestmanager.This.V(SourceFile:1)
05-19 04:26:56.994: E/AndroidRuntime(25337): at e.I.run(SourceFile:99)
05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Handler.handleCallback(Handler.java:815)
05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Handler.dispatchMessage(Handler.java:104)
05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Looper.loop(Looper.java:194)
05-19 04:26:56.994: E/AndroidRuntime(25337): at android.app.ActivityThread.main(ActivityThread.java:5779)
05-19 04:26:56.994: E/AndroidRuntime(25337): at java.lang.reflect.Method.invoke(Native Method)
05-19 04:26:56.994: E/AndroidRuntime(25337): at java.lang.reflect.Method.invoke(Method.java:372)
05-19 04:26:56.994: E/AndroidRuntime(25337): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1005)
05-19 04:26:56.994: E/AndroidRuntime(25337): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:800)
05-19 04:26:56.994: E/AndroidRuntime(25337): Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 176
05-19 04:26:56.994: E/AndroidRuntime(25337): at l.This.beginArray(SourceFile:338)
05-19 04:26:56.994: E/AndroidRuntime(25337): at j.of$This.Code(SourceFile:1)
05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$1.Code(SourceFile:93)
05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$This.Code(SourceFile:172)
05-19 04:26:56.994: E/AndroidRuntime(25337): ... 13 more
05-19 04:26:57.004: I/Process(25337): Sending signal. PID: 25337 SIG: 9
05-19 04:26:58.048: I/art(25443): Background sticky concurrent mark sweep GC freed 701(46KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 50MB/50MB, paused 5.901ms total 15.544ms
05-19 04:26:58.051: E/GED(25443): Failed to get GED Log Buf, err(0)
05-19 04:26:58.068: I/OpenGLRenderer(25443): Initialized EGL, version 1.4
05-19 04:26:58.069: W/OpenGLRenderer(25443): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
05-19 04:26:58.084: I/OpenGLRenderer(25443): Initializing program atlas...
05-19 04:27:29.607: W/IInputConnectionWrapper(25443): showStatusIcon on inactive InputConnection

1个回答

你有问题应该去他们官网的问答社区提问呀,好像有专门的技术人员在为大家解答难题,有啥问题可以直接贴上去嘛
给个传送门:Bmob问答社区

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问