Play 게임 서비스를 사용하고 싶습니다. GoogleApiClient를 Games.API와 함께 사용하고 connect() 메소드를 호출합니다. 그러나 항상 onConnectionFailed()에서 RESOLUTION_REQUIRED 오류가 발생합니다. 내가 Auth.API 대신 Games.API를 사용하는 경우GoogleApiClient Games.API 연결 오류
public class MainActivity extends Activity implements
ConnectionCallbacks,
OnConnectionFailedListener {
GoogleApiClient googleApiClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
googleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Games.API).addScope(Games.SCOPE_GAMES)
.build(); }
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
//ConnectionResult{statusCode=RESOLUTION_REQUIRED, resolution=PendingIntent{dd739ef: [email protected]}, message=null}
}
는하지만, 연결이 성공 및 호출 방법 onConnected(). 내가 에뮬레이터를 사용하여
public class MainActivity extends Activity implements
ConnectionCallbacks,
OnConnectionFailedListener {
GoogleApiClient googleApiClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
googleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Auth.GOOGLE_SIGN_IN_API)
.build();
}
@Override
public void onConnected(Bundle connectionHint) {
//Success
}
, 에뮬레이터에서 플레이 서비스의 버전은 10.0, 그래서 너무
compile 'com.google.android.gms:play-services-games:10.0.0'
compile 'com.google.android.gms:play-services-auth:10.0.0'
내가 여기
Google Play fails to connect, statusCode=RESOLUTION_REQUIRED 동일한 문제가 발견 Gradle을의 버전 10.0을 구축 설정할 수 있지만 저자는하지 않았다 어떤 대답이든.