protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.ana_sayfa); apiClient = new GoogleApiClient.Builder(this) .addApi(Games.API) .addScope(Games.SCOPE_GAMES) .enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() { @Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) { Log.e("HATA", "Google Play Oyun servisine bağlanamadı.Lütfen bağlantınızı kontrol ediniz."); finish(); } }).build();}我希望用户在打开应用程序时登录到 google play 服务。我收到以下错误。java.lang.IllegalStateException: A fatal developer error has occurred. Class name: zzf. Start service action: com.google.android.gms.games.service.START. Service Descriptor: com.google.android.gms.games.internal.IGamesService. at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(Unknown Source:20) at com.google.android.grns.common.internal.BaseGmsClient$zzc.zzo(Unknown Source:11) at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(Unknown Source:48) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looperloop(Looperjava:164) at android.app.ActivityThread.main(ActivityThread.java:6696) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCallerrun(Zygote.java:240) at com.android.internal.os.Zygotelnit.main(Zygotelnit.java:782)
1 回答
qq_遁去的一_1
TA贡献1725条经验 获得超7个赞
我解决了这个问题。我没有在清单文件中添加以下代码
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
添加回答
举报
0/150
提交
取消