- Home /
Unable to retrieve application from network while i try to connect with google play games services.
Hello everyone,
I recently developed an android game using Unity 5.5.4p4, now im triying to integrate achivements with google play games plugin made from unity.
I already configured step by step the plugin as explained in the documentation. I also have an closed Alpha version of the game uploaded into my google play console just for testing, signed with the sha1 generated in the keystote from player settings in Unity.
So my problem comes now, when my app runs, it try to connect with google play services using this method:
public bool GoogleLogin(){
bool resp = false;
Social.localUser.Authenticate((bool success) => {
resp = success;
});
return resp;
}
In runtime, the modal of the connection appears but after a few seconds it closes and i get this two errors into my android device monitor:
10-15 16:30:21.346: E/GameAgent(10854): Unable to retrieve application xxxxxxxxxxxx from network
10-15 16:30:21.347: E/GameAgent(10854): Application xxxxxxxxxxxx is not associated with package com.mypackage.name. Check the application ID in your manifest.
I know unity detects other manifest files from other plugins and then merge it to generate a final one that is stored in projectFolder/Temp/StaginArea/AdroidManifest.xml.
Aplication xxxxxxxxxxxx is the ID asociated to my app in the google play console, and it match with the ID that i have in my final manifest in this metadata:
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ xxxxxxxxxxxx" />
The package name that appears in the manifest is the same package i have asociated in google play console > games services > My game
I attach my manifest file with hidden app ID in case it could be useful:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="3" android:versionName="1.0.2" package="com.mypackage.name" android:installLocation="preferExternal">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/UnityThemeSelector" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">
<activity android:label="@string/app_name" android:name="com.unity3d.player.UnityPlayerActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:excludeFromRecents="true" android:exported="false" android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!--Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.-->
<service android:exported="true" android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID" android:value="" />
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ xxxxxxxxxxxx" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
If anyone could help me I would be very grateful, I have been stuck for several days and it's very frustrating.
Other threads i already check:
http://answers.unity3d.com/questions/1220475/unable-to-retrieve-application-from-network.html
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1292
https://github.com/playgameservices/play-games-plugin-for-unity/issues/216
Things i already doublecheck:
I have reinported the plugin from unity
I deleted the AndroidMAnifest.xml to regenerate it
I have made sure that the SHA1 key is the same as the google play console key and google API console Key
I'm testing the alpha version with the correct google account that i previously activated in google play console.
I create a brand new project in Google play console to configurate all the things again from cero.
Answer by asierbh · Aug 22, 2018 at 10:38 AM
It works for me:
After building the app, go into the temp > staging folder and open the android manifest that is in there. This will be the final merged manifest unity creates during build time. Make sure those lines are being merged into it correctly. If not, you can copy that final created manifest into the Plugins > Android folder in your project and then add those lines manually and try play services again.
Answer by PuzzledBoy · Aug 22, 2018 at 09:51 AM
Meet same error as you. But the strange things is I can login in successful with my account(don't know what make it special), And any other accounts get the same error.