[Solved] Cannot cast ‘android.view.View’ to ‘com.example.shabeer.listview.ListView’


You cannot cast an Android listview to your own listview.

Instead of “com.example.shabeer.listview.ListView” you need a “android.widget.ListView”. This is the one you are referencing in your xml layout file.

public static android.widget.ListView list_view;

and

list_view = (android.widget.ListView)findViewById(R.id.listView_id);

0

solved Cannot cast ‘android.view.View’ to ‘com.example.shabeer.listview.ListView’