Help installing Google Play Services on Cocos2dx 3.10 with CocosHelper using Android Studio

  • djblake
    Likes 0

    Problem Description

    I’ve been trying to implement Google Play Services into my Cocos2dx 3.10 app on android using Android Studio. Installing on iOS was a breeze so no problem there. I was following this tutorial listed below, but unfortunately it uses Eclipse and I am using Android Studio.
    https://www.youtube.com/watch?v=ZUy6strEHwA&list=PLRtjMdoYXLf5JspHx7a8yUWGT0ohvPmVX&index=13

    I was wondering if anyone has successfully implemented Google Play Services using Android Studio? I followed the video tutorial up until about 7:30min mark, and then from about 7:30 to 9:05 it does some steps implementing the Google Play Services Library which I believe is obselete in Android Studio. Instead, in Android Studio I am just going File, Project Settings, down to Modules on the left hand side, click the first main Module, then go to Dependancies and add the google place services as a Library depenency there.  I am completely new to all this and have only been using Android Studio a few days so maybe thats entirely wrong, I'm not sure, but I understand this is how you’re supposed to add the GPS lib in ordinary vanilla android development.

    However compiling this gives a build error
    \"> Error: more than one library with package name \'com.google.android.gms\'\"
    which appears to be conflicting with the GPS module that is created automatically by cocos2dx. I tried removing this and it seems to get further (and even report no errors in Android Studio) but falls over in terminal build later on. I am still working on those errors but I am wondering if I’m even on the right path?

    So my question is... has anyone implemented Google Play Services in android using Android Studio - and if so, how did you resolve the issues above?

    Any insight into this would be greatly appreciated!

     

  • Sonar Systems admin
    Likes 0

    Honestly I would recommend using Eclipse for Android atleast for now.I know this isn’t the answer you would like as Android Studio is sick but Cocos2d0x works better with Eclipse.

Login to reply