将Google Play添加到Unity Project - > Java.lang.ClassNotFoundException:com.google.android.gms.games.playgames
我有一个Unity 2020.3.32F1游戏,需要修复Google Play登录。我升级到0.11.1
,现在我得到了一个例外
androidjavaexception:java.lang.classnotfoundexception:com.google.android.gms.games.games.playgames
当我尝试启动库时
public google playplayservice() { initstatus = initstatus.notinitialized; loginstatus = loginstatus.notloggedin; PlayGamesplatform.debuglogenabled = true; PlayGamesplatform.activate(); log(“ playgamesplatform.activated”); }
按照他们有关添加前进和缩小的说明,无济于事。
我有点像Android Noob,所以这可能是基本的。
注意:
- 我运行了Android依赖性解析器。
- 缩放已打开以获取发行版
- Min API级别19
- 目标API级别30
- 我使用的是内部构建系统
- 在我的项目路径中没有奇怪的字符
I have a Unity 2020.3.32f1 game and need to fix Google Play login. I upgraded to 0.11.1
Now I get an exception
AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
when I try to init the library
public GooglePlayService() { InitStatus = InitStatus.NotInitialized; LoginStatus = LoginStatus.NotLoggedIn; PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); Log("PlayGamesPlatform.Activated"); }
Following their instructions on adding Proguard and minify did not help.
I am a bit of an Android noob so it's probably something basic.
Notes:
- I ran the Android dependency resolver.
- Minify is turned on for release
- Min API Level 19
- Target API level 30
- I am using the internal build system
- No strange characters in my project path
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我试图在Google Playgamesplugindependencies.xml中更改此代码
。
嗨,
Hi I tried to change this line of code in GooglePlayGamesPluginDependencies.xml form this
to this
I hope this help you