Android Intent Cannot resolve constructor


Intent myIntent = new Intent(v.getContext(), MyClass.class);


 Intent myIntent = new Intent(MyFragment.this.getActivity(), MyClass.class);

to start a new Activity. This is because you will need to pass Application or component context as a first parameter to the Intent Constructor when you are creating an Intent for a specific component of your application.

Leave a Comment