ioipts
ioipts

Reputation: 41

Android - Google Play Game Service, Could not find method android.view.View.getDisplay

The sign-in popup windows didnt show up. The logcat said

  Could not find method android.view.View.getDisplay, referenced from method com.google.android.gms.internal.bn$b.b
   VFY: unable to resolve virtual method 3169: Landroid/view/View;.getDisplay ()Landroid/view/Display;
   VFY: replacing opcode 0x6e at 0x0009

I only tested on the real device, Samsung S3 which is Android 4.1.2 (API 16). The getDisplay() method required API 17. I tried "extends FragmentActivity" but there is no getDisplay() in support-v4 library. GamesClient.Builder.setViewForPopups() either not help. The Google Game Play Service should support since Android 2.2 as requirement said.

All my dev tool are up-to-date. google-play-lib 3.1.59 (744626-30), SDK 22.0.4.

Thank you very much.

Upvotes: 4

Views: 1256

Answers (3)

Joe
Joe

Reputation: 14059

Could you post a more complete log? There is a possibility that those lines are not the reason the sign-in window does not show up on your app (see this other post which shows those lines in the logs and yet was able to proceed).

Other things that might be helpful to you:

  • Following the instructions for the Type-A-Number sample, I was able to run it on my phone with Android 4.1.1.
  • The Google Play Services library that I have is newer than what you have (3.2.65 (834000-30)).

Upvotes: 1

user3513843
user3513843

Reputation:

Try to test on a different version of Android, as I also was facing some problems while testing my Apps on Android 4.1.2 particularly. Also, it would be better if you put some code where you are getting error. It helps to solve the issue much faster.

Also, please let us know if the issue is fixed. It will be useful for anyone else with the same problem.

Upvotes: 0

Nguyen Duc An
Nguyen Duc An

Reputation: 333

Try these steps:

  1. Right click the project, and choose Properties
  2. Go to Java Build Path-Order and Export.
  3. Tick 'Android Private Libraries' if you put your libs there or tick on your libs.

Then clean and build.

Upvotes: 1

Related Questions