2016-05-20 3 views
2

Google Playサービスが9.0.83でインストールされている一部のデバイスで、GooglePlayServiceUtilの問題に直面しています。 再生サービスのバージョンが8.7.03のデバイスで同じものを確認しましたが、法的通知があります。Android GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(this)google playサービスバージョン9.0.83でnullを返す

以下は法的通知のために使用したコードです。

TextView tv = (TextView) findViewById(R.id.notice); 
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) == ConnectionResult.SUCCESS) { 
     Toast.makeText(this, "ConnectionResult.SUCCESS", Toast.LENGTH_LONG).show(); 
     tv.setText(GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(this)); 
}else if(GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) == ConnectionResult.SERVICE_MISSING){ 
     Toast.makeText(this, "ConnectionResult.SERVICE_MISSING", Toast.LENGTH_LONG).show(); 
}else if(GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) == ConnectionResult.SERVICE_DISABLED){ 
     Toast.makeText(this, "ConnectionResult.SERVICE_DISABLED", Toast.LENGTH_LONG).show(); 
} 

GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(this) 

は、バージョン9.0.83ではnullを返します。しかし、バージョン8.7.03と7.x.xのデバイスの法的通知文字列を返しています。

私も

GoogleApiAvailability.getInstance().getOpenSourceSoftwareLicenseInfo(Context) 

で試してみましたが、結果はGooglePlayServicesUtilと同じです。 誰かが適切な結果を得るためにこれについて私を導くことができれば助けになるでしょう。

+1

私は多くのプログラマが同じエラーを経験していると思います。このように[よくある質問](http://stackoverflow.com/questions/37273810/getopensourcesoftwarelicenseinfo-is-returning-null-now)、彼らはすでにバグレポートを提出しています。 [リンク]に関する最新情報(https://code.google.com/p/gmaps-api-issues/issues/detail?id=9806) –

答えて

1

私は同じ問題がありました。この回答を書いている時点でGoogle Playサービス(9.0.0)をアップグレードしてから、プロジェクトを再構築してアプリを再インストールしたところ、ライセンスが正しく取得され始めました。

私は使用していますGoogleApiAvailability.getInstance().getOpenSourceSoftwareLicenseInfo(this);

関連する問題