Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllNotFoundException: gpg in Unity Project #2028

Open
Aupuma opened this issue Nov 15, 2017 · 23 comments
Open

DllNotFoundException: gpg in Unity Project #2028

Aupuma opened this issue Nov 15, 2017 · 23 comments

Comments

@Aupuma
Copy link

Aupuma commented Nov 15, 2017

a friend and I are developing a game in Unity for Android, and we want to include some leaderboards with the Google Play Games Services, but we can't get the login to work.

We are using for the login the script MainGui from the minimal sample project of the Plugin. When we press the authenticate button it keeps saying "authenticating":

if (!Social.localUser.authenticated) { // Authenticate mWaitingForAuth = true; mStatusText = "Authenticating..."; Social.localUser.Authenticate((bool success) => { mWaitingForAuth = false; if (success) { mStatusText = "Welcome " + Social.localUser.userName; } else { mStatusText = "Authentication failed."; } }); }

Looking in the logcat, there is an error:
E/Unity: DllNotFoundException: gpg at (wrapper managed-to-native) GooglePlayGames.Native.Cwrapper.Builder:GameServices_Builder_Construct () at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Create () [0x00000] in <filename unknown>:0 at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in <filename unknown>:0 at GooglePlayGames.Native.NativeClient.Authenticate (System.Action2 callback, Boolean silent) [0x00000] in :0
at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action2 callback, Boolean silent) [0x00000] in <filename unknown>:0 at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in :0
at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback) [0x00000] in <filename unknown>:0 at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action1 callback) [0x00000] in :0
at LogInAndroid.OnGUI () [0x00000] in :0 `

We have already tried the solution posted in #280 (comment) but that does not work anymore as the build_plugin.sh does not exist in the current version. We've tried other answers as well as removed and re-added the plugin to the project, checked the api keys, built from a different computer, etc.

@kantagara
Copy link

Same issue here...

@anthonybarouch
Copy link

same here

@MaratGilyazov
Copy link

Face the issue when building via CloudBuild, ok when build locally

@bochelord
Copy link

Same issue here. I'm building locally, nothing on CloudBuild.

@colender
Copy link

Reimport the Plugin for some reason the .aar gets excluded

@kaixiang1306
Copy link

I solved it this way:
1.Reimported Google Play Games Plugin (It will select the missing files by default).
2.Go to Assets menu => Play Services Resolver => Android Resolver => Force Resolve.
3.After resolving dependencies, Resolve Conflict window pops up. Click NO.
I hope for your help

@bochelord
Copy link

I solved it simply adding again the .aar file

@Aupuma
Copy link
Author

Aupuma commented Nov 23, 2017

@kaixiang1306 I tried that but this is what happens:
android fail

error

@bochelord Where I can find the .aar file and where do I put it?

@bochelord
Copy link

@Aupuma sorry, but I grabbed it from another project that we were releasing at the same time. For whatever reason, in one project it worked and in the other one, it didn't. Relatively same architecture.
Of course, for the first project that worked, we applied the Android Dependencies.
Maybe you can try on a clean project and then grab the library from there. Not even close to an ideal solution, rather a dirty workaround, but it worked for us

@sinmaplewing
Copy link

My jar resolver keep removing the Assets/Plugins/Android/gpgs-plugin-support-0.9.42.aar file.
And after removing it and rebuilding it, I got the similar error: Unable to find gpg.

But after I put the Assets/Plugins/Android/gpgs-plugin-support-0.9.42.aar back, the build is all fine with gpgs......

@AdriaandeJongh
Copy link

I have this error too and haven't found a resolution yet. It's annoying as fuck as the resolver deletes the .aar every time scripts get reloaded.

@s-kris
Copy link

s-kris commented Dec 27, 2017

Just re-import the gpg plugin and play services/force-resolve it should work. It is caused due to missing gpgs-*.aar files. In our case, selecting 'use micro mscorlib' in stripping level removed those files.

@Reizoe
Copy link

Reizoe commented Dec 31, 2017

Re-importing and force-resolving still led to nothing. I also turned off stripping so that shouldn't be affecting things either. Not to mention I've never had a gpgs-plugin-support-(ver).aar file to begin with.

@s-kris
Copy link

s-kris commented Dec 31, 2017

@Reizoe yeah.. re-importing after selecting 'use micro mscorlib' didn't cause any problem

@Umkerius
Copy link

I have the similiar problem with MoPub and GPGS in one project. I removed android support libs in Plugins/MoPub/libs and reimported GPGS with force resolution. The problem disappeared

@irina88
Copy link

irina88 commented Mar 21, 2018

The solution proposed by s-kris worked for me. Thank you!

@Bruno2907
Copy link

For me what seemed to have solved this issue was turning off every setting related to auto update and then reverting to my last backup before this happened.
captura de tela 9

@kakapro
Copy link

kakapro commented Aug 18, 2018

I found that current GPG version not support ARM64 yet, so just uncheck ARM64 in Build Setting -> Other Settings -> Target Architectures to fix it.

@setebe
Copy link

setebe commented Sep 30, 2018

i tried all of your advices. but none of them worked.
Just go back to old 2017.4 version and you'll be fine

@chwuchang
Copy link

Updated to 0.9.64 and this bug (Unable to to load DLL 'gpg') still exist.
Not working on: Il2Cpp-ARM64
Working on: Il2Cpp-ArmV7, Il2Cpp-x86, Mono-all

@SantoshKetaraju
Copy link

Same here Not working on il2Cpp-arm64-v8a,
working on : il2Cpp -armeabi-v7a

google is going to remove support for 32 bit from 2021, also from august 1st 2019, Apps must have Arm64 support along with 32bit for the app to be visible in play store for 64bit version devices so it is a matter of urgency to solve this please anyone know or happen to find the solution post it :(

@SantoshKetaraju
Copy link

Updated to 0.9.64 and this bug (Unable to to load DLL 'gpg') still exist.
Not working on: Il2Cpp-ARM64
Working on: Il2Cpp-ArmV7, Il2Cpp-x86, Mono-all

Did you find any solution?

@SantoshKetaraju
Copy link

Updated to 0.9.64 and this bug (Unable to to load DLL 'gpg') still exist.
Not working on: Il2Cpp-ARM64
Working on: Il2Cpp-ArmV7, Il2Cpp-x86, Mono-all

Did you find any solution?

Ok so mine solved after i force resolved from play resolver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests