Git Product home page Git Product logo

Comments (6)

jamcohen avatar jamcohen commented on May 4, 2024

Thanks for reaching out. This isn't an issue that I'm aware of, but I can try to repro it.
Are there any other logs you can share?

from play-unity-plugins.

RadekMikulkaAG avatar RadekMikulkaAG commented on May 4, 2024

I found that google play is working, but only when I download build file from internal test from google play console. When I hit build and run button from your custom dropdown menu, than google is unable connect. Is possible that apk tool is changing my app signing key certificate? Because when I hit build and rung in unity file menu, that everything works fine

from play-unity-plugins.

jamcohen avatar jamcohen commented on May 4, 2024

Hmm it shouldn't change your signing certificate. It uses the keystore specified in Unity's Player Settings -> Publishing.
However the custom build process does modify the AndroidManifest. Maybe something in your AndroidManifest is getting stripped out?

Could you check the AndroidManifest for both the APK and AAB (built from Google -> Build and Run or Google -> Build Android App Bundle). You can inspect the AndroidManifest by dragging either file into AndroidStudio. You should see metadata fields for com.google.android.gms.games.APP_ID and com.google.android.gms.version (see here).

from play-unity-plugins.

radmikulka avatar radmikulka commented on May 4, 2024

Ok, I found some different, but I don't think, that it is problem. My original build and run apk contains:

    <meta-data
        android:name="com.google.android.gms.games.unityVersion"
        android:value="0.10.09" />

and my abb builded through Google/Build and Run button

    <meta-data
        android:name="com.google.android.gms.games.unityVersion"
        android:value="\u0030.10.09" />`

difference is in "\u003" but I suppose, that this is only some kind of special ascii char

from play-unity-plugins.

jamcohen avatar jamcohen commented on May 4, 2024

Yeah I'm not sure if that would cause any issues.

I should have time to reproduce this tomorrow, but in the meantime could you try downgrading the plugin to version 1.1.1 and seeing if Play Games services works? I know that there are apps successfully using these plugins together, so I'm wondering if it's a new issue.

from play-unity-plugins.

jamcohen avatar jamcohen commented on May 4, 2024

As far as I can tell, authentication works fine when using either Build & Run command (Unity's or Google's) with proguard disabled. If enable proguard minification, the authentication breaks it for both and throws this error:

2020-08-20 12:31:53.577 31338-31371/com.google.example.unity.minimal E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.Games
    java.lang.ClassNotFoundException: com.google.android.gms.games.Games
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:454)
        at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
        at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
        at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:214)
        at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.Games" on path: DexPathList[[zip file "/data/app/com.google.example.unity.minimal-oe4tSPTTOuktTfA1gHJ8iA==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.example.unity.minimal-oe4tSPTTOuktTfA1gHJ8iA==/lib/arm, /data/app/com.google.example.unity.minimal-oe4tSPTTOuktTfA1gHJ8iA==/base.apk!/lib/armeabi-v7a, /s

That's expected since proguard minifies the "com.google.android.gms.games.Games" class, which prevents the C# JNI code from looking it up by name.

I can fix this by following these ReadMe instrictions. After that, the app connects successfully for both Build & Run methods.

Does your app work when proguard minification is disabled?
Could you share you proguard-user.txt file?

I can't investigate any further without seeing the logs that your app produces when it fails to connect.

from play-unity-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.