2011-08-10 17 views
-1

私のリストビューでクリックした後にインテントを作成できません。完了したらそれはエラーにアプリケーションが予期せず停止しましたandroid listview intent

を与え、再び

public void onItemClick(AdapterView<?> parent, View view, int position, long id) { 
    Intent IntentDiscution = new Intent(view.getContext(), lstchoi.class); 
    IntentDiscution.setClass(InterfaceAcceuil.this, lstchoi.class); 
    startActivityForResult(IntentDiscution, 0); 
} 
+1

logcat出力を投稿できますか? – Pikaling

答えて

1

必ずあなたのmanifest.xmlにlstchoiを宣言してくださいしてみてください。それは活動であると仮定すると、あなたのようなものだろう:

<application android:icon="@drawable/icon" android:label="@string/app_name"> 

     <activity android:name=".lstchoi"/> 

をまた、この行を削除することができます:あなたは、同じ情報を示すために、コンストラクタを使用しているため

IntentDiscution.setClass(InterfaceAcceuil.this, lstchoi.class); 

それは冗長です。