我在这部分代码中出错:
private void launchReceiver() {
Cast.CastOptions.Builder apiOptionsBuilder = Cast.CastOptions
.builder( mSelectedDevice, mCastClientListener );
ConnectionCallbacks mConnectionCallbacks = new ConnectionCallbacks();
ConnectionFailedListener mConnectionFailedListener = new ConnectionFailedListener();
mApiClient = new GoogleApiClient.Builder(this)
.addApi( Cast.API, apiOptionsBuilder.build() )
.addConnectionCallbacks( mConnectionCallbacks )
.addOnConnectionFailedListener( mConnectionFailedListener )
.build();
mApiClient.connect();
}
这是错误行:
mApiClient = new GoogleApiClient.Builder(this)
错误说:
Builder (android.content.Context) in Builder cannot be applied to (com.example.pc.chromecast.MainActivity.MediaRouterCallback)
解决问题需要做什么?