Q:

java.lang.NoSuchMethodError: android.view.Window.getSharedElementEnterTransition

I am working on transitions for Android API level 19 and above. I have added support libraries as well to the project and have used both the  getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS) &
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS) flags. But still I am getting  java.lang.NoSuchMethodError for the method getSharedElementEnterTransition().
Can anyone tell me the solution to include transitions method for API level 19??
Here's the code:
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
          getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
            getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
        setContentView(R.layout.prescription);
         mPresLayout=(RelativeLayout)findViewById(R.id.pres_layout);
         mPres_text=(TextView)findViewById(R.id.pres_text);
         ViewCompat.setTransitionName(mPresLayout, PRESLAYOUT_NAME);
         ViewCompat.setTransitionName(mPres_text, PRESLAYOUT_TEXT);
         addTransitionListener();
         getWindow().setAllowEnterTransitionOverlap(false);
         getWindow().setAllowReturnTransitionOverlap(false);
         getWindow().setSharedElementExitTransition(null);
         getWindow().setSharedElementReenterTransition(reenterTransition());
    }

A:

It works fine with API 21 and above .
API 19 do not recognize it.

