Adding C++ code to Android project breaks Google Play integration

Steps to reproduce using plain 4.7.6 on Windows:

  1. Create new empty blueprint project
  2. Configure for Android development and deployment
  3. Configure for Google Play integration (app ID, package name, enable Google Play, add some achievements or leaderboard identifiers)
  4. In the first levels begin play event, use the “sign in to service” node and “cache achivements” nodes. Add Print String nodes for the error cases of these nodes.
  5. Package and deploy to Android
  6. Start the app, and note that it properly signs you into Google Play
  7. Now, in the editor, use the Add Code to Project… menu item. I used the Blueprint Library class; I doubt it matters.
  8. After visual studio opens, close it again, and re-build the C++ code
  9. Re-package for Android and re-start the app
  10. Notice that it now fails to connect to Google Play
    39812-

Hi jwatte,

Is this the same issue that Ryan Gerleve is assisting with on the Android forums? His expertise is much greater in this matter than mine, so if it is, I’m going to link that thread here for anyone else who might be seeing the same issue, and then close this particular thread out as resolved since he is helping you there. Just let me know.

Thanks!

Yes, this is the minimal reproduction path, suitable to file in a bug database. (Someone in the thread earlier suggested posting in answerhub to make sure it’s tracked.)

I have the same issue with OnlineSubsystemNull:
https://answers.unrealengine.com/questions/217983/modulemanager-module-onlinesubsystemnull-not-found.html

My issue is also packaging for Mac, not just for Android. Is it the same bug?

Hi all,

This issue is being answered by staff on the Android forums, please have a look at this thread for a more in-depth discussion of this particular issue.

Thanks very much!

Had the exact same problem. I’ll make a tl;dr and actually slightly modified version of the thread that wittlief linked you to:

Open your [project].Build.cs file and simply add “OnlineSubsystemGooglePlay” in the PublicDependencyModuleNames list.

Google Play services now work in development (only the login for dev, of course) and distribution!

I made this post in the thread as well, for anyone arriving there.

Could we possibly get a bug report sent in for this? It’s an incredibly easy fix, but not at all obvious.

I’ve been in discussions with the Android dev about a number of issues that fall under the aegis of UE4, Android and Google Play services. He is working on a fix that might address a spectrum of problems for the upcoming 4.8 release. Unfortunately as it covers a number of possible things, there is not a single bug that has been submitted that I can point to that covers all issues.

He is also monitoring that linked forums thread above from 4/20/15 wherein Ryan Gerleve is assisting, so feel free to monitor that thread for more up to date info from Ryan and Chris about what might be upcoming.

Sorry that I can’t give a more definitive answer than that, but it is definitely being examined. It almost certainly won’t be fixed for users until some form of 4.8, but we’re rapidly speeding towards that update (or at the very least the first preview) so it should not be much longer.

Thanks!

Really appreciate your guys’ hard work and accessibility!

Thanks for hanging in there!

Thanks for the update. As long as I know it’s being tracked and won’t mysteriously fall off the radar, I’m OK :slight_smile:

Did my solution not work for you?

This bug still reproduces as described above.

Unfortunate :frowning:

Hi jwatte,

Did you have a look at Ryan Gerleve’s response with respect to your specific project? That might be why it worked for DC Gage and not you.

I think you misunderstand this bug report.
Ryan’s help is all about “how can jwatte get a slice of cake?”
(Thanks for the cake, btw!)

This bug report is about “how can Epic make sure that each developer gets cake without a staff member having to help each time?”

well, I feel like that’s what my response to DC Gage above was for. Many things will be fixed in the 4.8 release.

Unfortunately, because of that, I and others can’t really help any other individuals in this thread but you yourself, jwatte, and even that help was just to remind you that Ryan Gerleve had given you some specific pointers in the linked forums thread.

Further responses are just to refine what exactly is the problem so we can get more fixes in if the ones discussed do not work for you.