Domanda

I can't build the sample game TypeANumberChallenge provided by Google (see GitHub). Got the following error message:

The project was not built since its build path is incomplete. Cannot find the class file for com.google.android.gms.games.GamesClient. Fix the build path then try building this project

The type com.google.android.gms.games.GamesClient cannot be resolved. It is indirectly referenced from required .class files    MainActivity.java   /TypeANumber/src/com/kerrywei/games/tanc

I did include the project library BaseGameUtils and google-play-services-lib as described by readme and Google Play Services Guides, but still got the error, and can't just compile...

Update: I tried to remove TypeANumberChallenge and redo the whole process and got a new error when trying to add BaseGameUtils as library:

An internal error occurred during: "Android Library Update".
Path must include project and resource name: /BaseGameUtils
È stato utile?

Soluzione

Problem solved by reading Google Play Services Guides

  1. Make a copy of the Google Play services library project. Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects. If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

You CANNOT use the lib project in SDK folder DIRECTLY... What a joke..

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top