1
\$\begingroup\$

I'm trying to include Google Play Game Services in my Android game and I tried adding BaseGameUtils library. But it is not really working.

I can call the GameHelper class from AndroidLauncher but not the Games class for getting leaderboards.

I also have this warning in my console: (which does not interfere with the actual problem - see the answer)

project ':android': Unable to resolve additional project configuration.
Details: groovy.lang.MissingPropertyException: Could not find property 'main' on SourceSet container.

Can somebody give any insight to this problem?

This is my android gradle: http://pastebin.com/ya85gGs4

And this my BaseGameUtils gradle: http://pastebin.com/0iyz2j12

Also the root gradle: http://pastebin.com/in2MmYMM

When I check Project Structure -> Problems, I have these messages:

Project Structure

EDIT: I have tried changing android support library, appcompat and google play services to different versions including the latest ones but this error keeps pissing me off.


PS: Please feel free to edit the title. I put the date because I wanted to imply that this is a recent issue.

\$\endgroup\$
  • \$\begingroup\$ Anybody has some suggestions? \$\endgroup\$ – WeirdElfB0y Dec 30 '16 at 8:10
0
\$\begingroup\$

I spent the last 2 weeks trying to find a solution to this and it turns out I was using a 32-bit version of IntelliJ. All I had to do was to use the 64-bit program which is available in the same directory. But I don't know how this solved the problem. It's possibly because of the JRE used by the 32bit IDE. The 64bit IDE uses the java we installed while the 32bit one uses the java that's shipped with IDEA as mentioned here.

I got the solution from another entirely different error debugging. They should have provided me with a better warning/error message. I stumbled on this problem while I was changing the JDK version in Maven settings of IntelliJ.

EDIT: I may have to mention that even now, the warning

project ':android': Unable to resolve additional project configuration.
Details: groovy.lang.MissingPropertyException: Could not find property 'main' on SourceSet container.

is still present. It is indeed caused by the inclusion of BaseGameUtils library but it does not interrupt getting the necessary library files.


tl;dr

Use idea64.exe in C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3.2\bin instead of idea.exe

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.