image.png


    Use

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

    or

    1. 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.

    参考
    https://stackoverflow.com/questions/20241857/android-intent-cannot-resolve-constructor