I am using Android Studio (Beta), and while using this java code in \'onCreateView()\', I get an error.
ListView listView = (ListView) findViewById(R.id.some
If you are using it in an static AsyncTask, or any other class, you can pass the activity as a parameter to a method or constructor, for example:
activity onCreate:
//Pass activity variable (this)
new Main2Activity.MyTask().execute(this);
class inside activity:
private static class MyTask extends AsyncTask