Note that as written this code should fail to compile. UnrealTargetPlaform should be UnrealTargetPlatform.
I can’t reproduce this issue in 4.7.6, even without regenerating the project files. Specifically, after adding a C++ class to a Blueprint project, I:
- Added OnlineSubsystem and OnlineSubsystemGooglePlay to the PrivateDependencyModuleNames list in the project’s Build.cs file.
- Switched back to the Unreal Editor and choose File -> Package Project -> Android ->Android (ATC) (or any other texture format appropriate for your device)
- Ran the Install_*.bat file in the final packaged directory
- Start the app on the phone, and notice that the line “FOnlineSubsystemAndroid::Init” appears in logcat. This indicates the engine was able to find the OnlineSubsystemGooglePlay module.
Can you confirm that after following these steps, you still see the “Module ‘OnlineSubsystemGooglePlay’ not found” error in logcat?