what seems to be the problem with view here? how do i solve it?
the error "View cannot be resolved to a type"
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
Object o = my_listview.getItemAtPosition(position);
// write you handling code like...
String st = "sdcard/";
File f = new File(st+o.toString());
// do whatever u want to do with 'f' File object
Log.d("The position fo f:",o.toString());
}
any ideas?
"cannot be resolved to a type" means that the compiler has decided that, according to the syntax of the language, what it found at this place in the code has to be type, which means either a class, an interface, or a primitive tpye, but cannot find the definition of any type with that name.
Solution: In Eclipse, the cause of this problem is that somehow the SYSTEM JRE LIBRARY associated with the project was deleted. Simple fix in Eclipse: Right Click Project you are working on from Package Explorer.
You should import it. If you are using Eclipse, press Ctrl+Shift+o.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With