Früher war ichdie Google-Dienste für die Benachrichtigung für gcmId gneration spielen degradieren
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
und
classpath 'com.google.gms:google-services:1.5.0-beta2'
vor der Generierung GCMId mit Ich Überprüfung Play-Dienste
/**
* Check the device to make sure it has the Google Play Services APK. If
* it doesn't, display a dialog that allows users to download the APK from
* the Google Play Store or enable it in the device's system settings.
*/
public boolean checkPlayServices() {
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);
if (resultCode != ConnectionResult.SUCCESS) {
if (apiAvailability.isUserResolvableError(resultCode)) {
apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST).show();
} else {
if (AppConstants.DEBUG) {
Log.i(TAG, "This device is not supported.");
}
finish();
}
}
return true;
}
Ich bekomme gcm Fehlercode 2 in 20% Geräte, was bedeutet, „Play-Dienste-Update wird in diesen Geräten benötigt“
Also habe ich beschlossen, die Play-Service-Version zu
compile 'com.google.android.gms:play-services-gcm:6.5.87'
compile 'com.google.android.gms:play-services-analytics:6.5.87'
compile 'com.google.android.gms:play-services-location:6.5.87'
herabzustufen, aber es gibt mir Fehler.
Fehler: Ausführung fehlgeschlagen für Task ': app: processDebugGoogleServices'. Bitte beheben Sie den Versionskonflikt, indem Sie entweder die Version des Google-Services-Plugins aktualisieren oder die Version von com.google.android.gms auf 8.3.0 aktualisieren.
Was soll ich reparieren ??
Kann ich GCM auch generieren, wenn der Play-Service den Fehlercode 2 gibt (bedeutet auch, wenn der Play-Service aktualisiert werden muss)?