Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Connection errors when running minimalist. #5

Closed

Description

@stolk

So I now have built the unmodified sources of minimalist android example.

The changes I made are limited to:

  • Pointing to my gpg include files in Android.mk
  • res/values/ids.xml changed to use my app id.
  • Used my package name in AndroidManifest.xml

I use: ndkr9d, v1.3 of google play game services sdk. v21 of google play services.
Latest google play services app downloaded.
My account is registered as test account for my app.
My app is linked twice, with debug and release keys in Google Play Developer Console.

When running, I get the log below.

There are two problems with it:

  1. The login fails (see end of log.)
  2. There are problems with class definitions not being found. (see start of log.)
V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016
I/native-activity(12369): Setting up gpg-cpp
I/TeapotNativeActivity(12369): Initializing Services
I/TeapotNativeActivity(12369): Uninitialized services, so creating
V/GamesNativeSDK(12369): Using classes from /data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar.
D/dalvikvm(12369): DexOpt: --- BEGIN '4da25210572e7e07ea67142ded62c42e.jar' (bootstrap=0) ---
D/dalvikvm(12385): DexOpt: load 4ms, verify+opt 0ms, 90732 bytes
D/dalvikvm(12369): DexOpt: --- END '4da25210572e7e07ea67142ded62c42e.jar' (success) ---
D/dalvikvm(12369): DEX prep '/data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar': unzip in 0ms, rewrite 56ms
E/GamesNativeSDK(12369): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.NativeSdkEntryPoints" on path: DexPathList[[zip file "/data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]].
W/dalvikvm(12369): Unable to resolve superclass of Lcom/google/android/gms/common/api/d; (148)
W/dalvikvm(12369): Link of class 'Lcom/google/android/gms/common/api/d;' failed
I/dalvikvm(12369): Could not find method com.google.android.gms.common.api.d.a, referenced from method com.google.android.gms.common.api.GoogleApiClient$Builder.gl
W/dalvikvm(12369): VFY: unable to resolve static method 3084: Lcom/google/android/gms/common/api/d;.a (Landroid/support/v4/app/FragmentActivity;)Lcom/google/android/gms/common/api/d;
D/dalvikvm(12369): VFY: replacing opcode 0x71 at 0x0002
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/FragmentActivity;)
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.api.GoogleApiClient$Builder.enableAutoManage
W/dalvikvm(12369): VFY: unable to resolve check-cast 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/api/GoogleApiClient$Builder;
D/dalvikvm(12369): VFY: replacing opcode 0x1f at 0x0010
V/AlarmManager(  934): waitForAlarm result :4
V/AlarmManager(  934): AlarmManager_setLocked to type=2 curELAPSED = 509933487 as =509948 ans=897000000
V/AlarmManager(  934): sending alarm Alarm{44a2e7a8 type 0 PendingIntent{44f3bd30: PendingIntentRecord{4468f6b8 startService Key{startService pkg=com.android.vending intent=cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService flags=0x0 u=0}}}}
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/FragmentActivity;)
W/dalvikvm(12369): Unable to resolve superclass of Lcom/google/android/gms/common/api/d; (148)
W/dalvikvm(12369): Link of class 'Lcom/google/android/gms/common/api/d;' failed
I/dalvikvm(12369): Could not find method com.google.android.gms.common.api.d.a, referenced from method com.google.android.gms.common.api.b.stopAutoManage
W/dalvikvm(12369): VFY: unable to resolve static method 3084: Lcom/google/android/gms/common/api/d;.a (Landroid/support/v4/app/FragmentActivity;)Lcom/google/android/gms/common/api/d;
D/dalvikvm(12369): VFY: replacing opcode 0x71 at 0x000a
W/PopupManager(12369): 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.
I/TeapotNativeActivity(12369): Created
V/GamesNativeSDK(12369): Received Activity Resume Event.
I/GamesNativeSDK(12369): Connecting to Google Play...
V/GamesNativeSDK(12369): Attached to JVM on thread main_dispatch
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
V/AlarmManager(  934): trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
V/AlarmManager(  934): !@trigger WAKEUP Alarm{44a2e7a8 type 0 PendingIntent{44f3bd30: PendingIntentRecord{4468f6b8 startService Key{startService pkg=com.android.vending intent=cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService flags=0x0 u=0}}}}
D/StatusBarManagerService(  934): semi p:12369,o:f
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
W/dalvikvm(12369): VFY: unable to resolve instanceof 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
D/dalvikvm(12369): VFY: replacing opcode 0x20 at 0x0008
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
W/dalvikvm(12369): VFY: unable to resolve check-cast 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
D/dalvikvm(12369): VFY: replacing opcode 0x1f at 0x000c
D/InputTransport(  934): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (server)', fd=401
D/InputTransport(  934): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=435
D/InputTransport(  934): Input channel destroyed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=435
D/InputTransport(12369): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=67
D/PhoneStatusBar( 1283): setSemiTransparentMode=false, mTransparentMode=false, mSemiTransparentMode=false, mMultiWindowMode=false
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
I/SurfaceFlinger(  414): id=518 createSurf (1440x2560),4 flag=404, com.steenriver.Biplane/android.app.NativeActivity
I/SpenGestureManager(  934): setFocusWindow21020
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/InputDispatcher(  934): Focus entered window: Window{441ed7d0 u0 com.steenriver.Biplane/android.app.NativeActivity}
D/PointerIcon(  934): setMouseIconStyle1 pointerType: 1001iconType:101 flag:0
D/PointerIcon(  934): setMouseCustomIcon IconType is same.101
D/PointerIcon(  934): setHoveringSpenIconStyle1 pointerType: 10001iconType:1 flag:0
D/PointerIcon(  934): setHoveringSpenCustomIcon IconType is same.1
D/ViewSystem(12369): >> surfaceCreated
D/ViewSystem(12369): >> surfaceChanged W=1440, H=2560)
I/Adreno-EGL(12369): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build:  ()
I/Adreno-EGL(12369): OpenGL ES Shader Compiler Version: E031.24.02.06
I/Adreno-EGL(12369): Build Date: 06/10/14 Tue
I/Adreno-EGL(12369): Local Branch: LA.3.6_018_20140610_r780815_593820
I/Adreno-EGL(12369): Remote Branch: 
I/Adreno-EGL(12369): Local Patches: 
I/Adreno-EGL(12369): Reconstruct Branch: 
I/qdutils (12369): PartialUpdate status: Disabled
I/qdutils (12369): Left Align: 8
I/qdutils (12369): Width Align: 8
I/qdutils (12369): Top Align: 1
I/qdutils (12369): Height Align: 1
I/qdutils (12369): Min ROI Width: 1
I/qdutils (12369): Min ROI Height: 2
I/qdutils (12369): Needs ROI Merge: 0
I/qdutils (12369): Left Split=720
I/qdutils (12369): Right Split=720
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=435
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=436
D/InputTransport(  934): Input channel destroyed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=436
D/InputTransport( 2181): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=80
D/InputTransport( 1480): Input channel destroyed: name='ClientState{442e4a78 uid 10011 pid 1480} (server)', fd=79
W/ContextImpl(  934): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1512 com.android.server.InputMethodManagerService$4.run:2728 java.lang.Thread.run:841 <bottom of call stack> <bottom of call stack> 
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=436
D/InputTransport(  934): Input channel destroyed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=436
D/InputTransport(12369): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=72
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
I/ActivityManager(  934): Displayed com.steenriver.Biplane/android.app.NativeActivity: +285ms
I/Sensors (  934): Acc old sensor_state 8192, new sensor_state : 8193 en : 1
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/InputTransport(  934): Input channel destroyed: name='43e07cf8 Starting com.steenriver.Biplane (server)', fd=389
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
V/GamesNativeSDK(12369): Play Games callback indicates connection failure.
D/InputTransport(  934): Input channel destroyed: name='43e07cf8 Starting com.steenriver.Biplane (client)', fd=399
I/GamesNativeSDK(12369): UI interaction required to connect to Google Play.
I/TeapotNativeActivity(12369): Sign in finished with a result of -3
I/native-activity(12369): OnAuthActionFinished
I/native-activity(12369): You are not logged in!
I/TeapotNativeActivity(12369): Fetching all blocking
I/TeapotNativeActivity(12369): --------------------------------------------------------------
I/TeapotNativeActivity(12369): Fetching all nonblocking
I/TeapotNativeActivity(12369): --------------------------------------------------------------
I/TeapotNativeActivity(12369): Achievement response status: -3

Activity

  1. orionnoir commented on Dec 2, 2014

    @orionnoir

    Try the calls using their blocking equivalents. If it works without using callbacks then you likely have a threading issue (specifically this is likely a JNI issue not a GPG issue.) In my case it was the callbacks trying to access/set java side code/views via JNI calls from native code. I got around this by caching the class loader of the JVM for when I made JNI calls in a callback and then attach the callback thread to attach to the main thread and let the call back proceed.

    Any easy way to see if the ClassNotFound issue is to avoid making those JNI calls from the c++ callback (you get to be lazy and dodge the complexity.) For testing you can just see if that is the case by not informing the Application framework side (java). In my case it is necessary so I had to fight to get past it (aggressive JNI error handling of Java side exceptions to start with.) I literally don't have time to explain further, but I will try to dig up links that helped me if you think its a thread issue. Keywords/phrases to search:
    JNI, JVM, "attaching threads", caching class loaders

    We have project differences:
    I am not using supporting L (lollipop) yet.
    Not using any of the samples except for bits gleaned from it (I integrated it into cocos2d-x framework v2.2.5)

    I know log in works, I got leaderboards working, achievements don't save when posted (no errors) and the realtime multiplayer doesn't create games yet 9using quick game examples that abound.) But I have seen authorization work, as well as leaderboards. Those are my only qualifications to speak of at this time...

    -Still learning

  2. stolk commented on Dec 2, 2014

    @stolk
    Author

    In don't think it was a threading issue.
    I can now log in.

    I was under the presumption that no manual login action was req'd.
    However, at first, the autologin at app start will fail.
    Only if you manually request a login, and agree to google+ privacy terms, will you get logged in.
    After that, subsequent auto logins do get through.

    I still get the undefined class errors though.
    I think they may be common and are typically ignored?

  3. stolk commented on Dec 2, 2014

    @stolk
    Author

    The log in works, despite the error message on console. So I will just close this.

  4. samtstern commented on Dec 3, 2014

    @samtstern

    @stolk thanks for working this out. I have not personally seen that log error but according to this user on StackOverflow they are OK to ignore. I'll look into why they are there at all when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions