J'utilise Eclipse, LibGdx 1.0.1, Dernières Google Play Lib, et les derniers BaseGameUtils de https://github.com/playgameservices/android-sampleserreurs en utilisant LibGdx avec Google Play Services/BaseGameUtils (Gradle)
(Projet Gradle)
Mon BaseGameUtils a quelques erreurs
GameHelper.java
// Api options to use when adding each API, null for none
GoogleApiClient.ApiOptions mGamesApiOptions = null; //error with this line
GoogleApiClient.ApiOptions mPlusApiOptions = null; //error with this line
GoogleApiClient.ApiOptions mAppStateApiOptions = null; //error with this line
/**
* Sets the options to pass when setting up the Games API. Call before
* setup().
*/
public void setGamesApiOptions(GoogleApiClient.ApiOptions options) { //error with this line
doApiOptionsPreCheck();
mGamesApiOptions = options; //error with this line
}
/**
* Sets the options to pass when setting up the AppState API. Call before
* setup().
*/
public void setAppStateApiOptions(GoogleApiClient.ApiOptions options) { //error with this line
doApiOptionsPreCheck();
mAppStateApiOptions = options; //error with this line
}
/**
* Sets the options to pass when setting up the Plus API. Call before
* setup().
*/
public void setPlusApiOptions(GoogleApiClient.ApiOptions options) { //error with this line
doApiOptionsPreCheck();
mPlusApiOptions = options; //error with this line
}
/**
* Creates a GoogleApiClient.Builder for use with @link{#setup}. Normally,
* you do not have to do this; use this method only if you need to make
* nonstandard setup (e.g. adding extra scopes for other APIs) on the
* GoogleApiClient.Builder before calling @link{#setup}.
*/
public GoogleApiClient.Builder createApiClientBuilder() {
if (mSetupDone) {
String error = "GameHelper: you called GameHelper.createApiClientBuilder() after "
+ "calling setup. You can only get a client builder BEFORE performing setup.";
logError(error);
throw new IllegalStateException(error);
}
GoogleApiClient.Builder builder = new GoogleApiClient.Builder(
mActivity, this, this);
if (0 != (mRequestedClients & CLIENT_GAMES)) {
builder.addApi(Games.API, mGamesApiOptions); //error with this line
builder.addScope(Games.SCOPE_GAMES);
}
if (0 != (mRequestedClients & CLIENT_PLUS)) {
builder.addApi(Plus.API, mPlusApiOptions); //error with this line
builder.addScope(Plus.SCOPE_PLUS_LOGIN);
}
if (0 != (mRequestedClients & CLIENT_APPSTATE)) {
builder.addApi(AppStateManager.API, mAppStateApiOptions); //error with this line
builder.addScope(AppStateManager.SCOPE_APP_STATE);
}
mGoogleApiClientBuilder = builder;
return builder;
}
J'ajouté //error with this line
sur les lignes avec vous l'avez deviné des erreurs.
Comme je l'ai mentionné avant je crois que j'ai les dernières bibliothèques, et je suis sûr que mes projets sont liés correctement. J'ai également les lignes de code nécessaires dans mon fichier AndroidManifest.xml
.
L'homme que je deviens fou ... J'espère qu'il sera mis à jour bientôt. Merci – WaZz
Pas de problème. S'il vous plaît, upvote la réponse si elle a résolu le problème. – objitsu
mon représentant n'est pas assez élevé lol. Où puis-je obtenir 4,3? – WaZz