0

Trying to set up some enhanced PIP functionality. Getting stuck on declaring this variable:

/** The arguments to be used for Picture-in-Picture mode. */
    private final PictureInPictureParams.Builder mPictureInPictureParamsBuilder =
            new PictureInPictureParams.Builder();

I have an import at the top of the class:

import android.app.PictureInPictureParams;

but this has a compile error:

Cannot Resolve PictureInPictureParams

In my build.gradle file, I have these two lines:

compile 'com.android.support:appcompat-v7:26.1.0'  
compile 'com.android.support:support-media-compat:26.1.0'

Anyone know how I can resolve this dependency? Thank you.

4

1 回答 1

0

将您的设置compileSdkVersion为 26 或更高。

于 2017-11-08T16:54:05.660 回答