【发布时间】:2014-10-13 00:47:38
【问题描述】:
我正在使用来自以下来源的 Google Play Services Plugin for Unity3D https://github.com/playgameservices/play-games-plugin-for-unity
当我尝试显示我的排行榜或成就时,我收到以下消息:
好像authentication总是返回false。
目前用户只能登录 google play。
10-11 11:39:17.972 I/Unity (16208): AndroidJavaException: java.lang.NoSuchMethodError: no method with name='getClass' signature='()Ljava/lang/Object;'在 Lcom/google/android/gms/common/api/b 类中; 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine.AndroidJNISafe.CheckException () [0x00000] in :0 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine.AndroidJNISafe.GetMethodID (IntPtr obj, System.String name, System.String sig) [0x00000] in :0 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine._AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in :0 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine.AndroidJNIHelper.GetMethodID (IntPtr javaClass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in :0 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine._AndroidJNIHelper.GetMethodIDAndroidJavaObject [0x00000] in :0 10-11 11:39:17.972 I/Unity (16208): 在 UnityEngine.AndroidJNIHelper.GetMethodID[AndroidJavaObject] (IntPtr jclass, System.String methodName, System.Object[] arg 10-11 11:39:19.617 W/ActivityManager(2155):ActivityRecord 的活动暂停超时{4232ec38 co.uk.gringames.hungrybobproject/com.unity3d.player.UnityPlayerNativeActivity} 10-11 11:39:38.747 I/Unity (16208): AndroidJavaException: java.lang.NoSuchMethodError: no method with name='getClass' signature='()Ljava/lang/Object;'在 Lcom/google/android/gms/common/api/b 类中; 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine.AndroidJNISafe.CheckException () [0x00000] in :0 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine.AndroidJNISafe.GetMethodID (IntPtr obj, System.String name, System.String sig) [0x00000] in :0 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine._AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in :0 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine.AndroidJNIHelper.GetMethodID (IntPtr javaClass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in :0 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine._AndroidJNIHelper.GetMethodIDAndroidJavaObject [0x00000] in :0 10-11 11:39:38.747 I/Unity (16208): 在 UnityEngine.AndroidJNIHelper.GetMethodID[AndroidJavaObject] (IntPtr jclass, System.String methodName, System.Object[] arg
//leaderboard strings
private string leaderboard = "sasaa";
//achievement strings
// Use this for initialization
void Awake()
{
PlayGamesPlatform.Activate();
}
public void GooglePlayGames(string process)
{
if (process == "login") {
Social.localUser.Authenticate ((bool success) =>
{
if (success) {
Debug.Log ("You've successfully logged in");
} else {
Debug.Log ("Login failed for some reason");
}
});
} else if (process == "lead") {
if (!Social.localUser.authenticated) {
}else{
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI (leaderboard);
}
}
}
请帮忙!
亲切的问候,
丹尼尔
【问题讨论】:
标签: unity3d google-play-games nosuchmethoderror