playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
972 stars 971 forks source link

Adding BaseGameUtils to LibGDX: Library has broken classes paths error #236

Closed chandujr closed 7 years ago

chandujr commented 7 years ago

I'm trying to implement Play Services in my Libgdx game. Following this tutorial, I downloaded the BaseGameUtils library from here and added it to my project.

When I open the BaseGameUtils.java file, I have errors in the import statement:

import com.google.android.gms.common.ConnectionResult; // cannot resolve symbol 'common'

When I view the Project Structure window, there are errors listed:

Problems tab in Project Structure

The changes I made after adding the BaseGameUtils library to the project:

Root gradle file: http://pastebin.com/in2MmYMM Android gradle file: http://pastebin.com/ya85gGs4 BaseGameUtils gradle file: http://pastebin.com/0iyz2j12

claywilkinson commented 7 years ago

Can you build the samples in this repository successfully? Did you try to remove BaseGamesUtils from your project and add the play-services-* dependencies directly to your project? There is not much in BaseGameUtils that is still useful to a new game, it is mostly there as reference.

chandujr commented 7 years ago

@claywilkinson Thank you but this issue got solved when I used the 64-bit IDEA. I was using the 32-bit version. I'm not really sure of the underlying problem, probably JRE compatibility issues?

Anyway, the library got downloaded without errors when working with the 64-bit IDE. (idea64.exe in the /bin/ directory).

claywilkinson commented 7 years ago

Thanks for the response & I am glad you got it working.