2

因此,我们正在开发基于 Unity 的 Android 游戏。我们已经实现了 Facebook 身份验证,这利用了 Android/Res 文件夹。它在那里存储一些值和图像。

在尝试实现用于身份验证、排行榜、成就......的 Google Play SDK 时,我们意识到它也使用了 Android/Res 文件夹,这显然会导致崩溃并且目前不可能。

我们对 2 个选项感到好奇

1) 有没有可能的方法允许 2 个不同的服务使用 Android 资源系统?请注意,我们使用的是 Unity,该插件由 Prime31 制作。

如果库的源已发布,则可以进行修改,以便不使用资源文件夹。

2) 如果我们无法让 Facebook 和 Google Play 服务共存,那么整个过程是否可以通过 REST JSON 访问?我们的应用程序如何启动浏览器或 Google+ 应用程序以安全地获取凭据,从而执行 Google+ 登录?

请参阅下面的错误日志

W/PopupManager(11358): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.W/dalvikvm(11358): VFY: unable to resolve static field 1994 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0041

W/dalvikvm(11358): VFY: unable to resolve static field 1990 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x004c

W/dalvikvm(11358): VFY: unable to resolve static field 2000 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0057

W/dalvikvm(11358): VFY: unable to resolve static field 1997 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0069

W/dalvikvm(11358): VFY: unable to resolve static field 1991 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0009

W/dalvikvm(11358): VFY: unable to resolve static field 1988 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0010

W/dalvikvm(11358): VFY: unable to resolve static field 1998 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0017

W/dalvikvm(11358): VFY: unable to resolve static field 1995 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;

D/dalvikvm(11358): VFY: replacing opcode 0x60 at 0x0004

I/dalvikvm(11358): DexOpt: unable to optimize static field ref 0x07c9 at 0x18 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm(11358): DexOpt: unable to optimize static field ref 0x07c8 at 0x38 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm(11358): DexOpt: unable to optimize static field ref 0x07c5 at 0x3f in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm(11358): DexOpt: unable to optimize static field ref 0x07cf at 0x46 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm(11358): DexOpt: unable to optimize static field ref 0x07cc at 0x66 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

D/Prime31 (11358): onConnectionFailed: result 4

D/Prime31 (11358): onConnectionFailed: since user didn't initiate sign-in, failing now.

D/dalvikvm(11358): GC_CONCURRENT freed 430K, 5% free 9477K/9936K, paused 2ms+2ms, total 27ms

I/Unity   (11358): authenticationFailedEvent: Unknown error

I/Unity   (11358): 

I/Unity   (11358): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 54)

I/Unity   (11358):

E/Prime31 (11358): Exception running command on UI thread: Not connected. Call connect() and wait for onConnected() to be called.

D/dalvikvm(11358): GC_CONCURRENT freed 385K, 5% free 9477K/9936K, paused 2ms+2ms, total 27ms

D/dalvikvm( 6765): GC_CONCURRENT freed 417K, 7% free 9483K/10172K, paused 7ms+2ms, total 32ms

E/Prime31 (11358): Exception running command on UI thread: Not connected. Call connect() and wait for onConnected() to be called.

D/dalvikvm(11358): GC_CONCURRENT freed 385K, 5% free 9478K/9936K, paused 2ms+2ms, total 29ms

D/dalvikvm(11358): GC_CONCURRENT freed 387K, 5% free 9478K/9936K, paused 6ms+1ms, total 62ms

D/Prime31 (11358): isGooglePlayServicesAvailable returned 0

D/Prime31 (11358): beginUserInitiatedSignIn: continuing pending sign-in flow.

D/Prime31 (11358): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{423c8fe8: android.os.BinderProxy@423c8f88}}

D/Prime31 (11358): --------------------- result has resolution. Starting it. --------------------

I/ActivityManager(  506): START u0 {cmp=com.phyken.wizardopstactics/com.prime31.PlayServicesProxyActivity} from pid 11358

D/dalvikvm(11358): GC_CONCURRENT freed 384K, 5% free 9481K/9936K, paused 5ms+4ms, total 80ms
4

1 回答 1

0

1)使用资源文件夹的两个服务没有任何问题。所有资源都将在最终的 APK 上,只需注意资源名称,以免它们发生冲突。最佳做法是使用后缀(例如:fb_logo.png 和 google_logo.png,而不是两个 logo.png 图像)

2)不需要!

如果您发布了错误日志,那么帮助并指出确切的问题会更容易!

于 2013-06-06T12:22:21.940 回答