0

After I run the code on my Phone, I always get a "Unknown issue with Google Play Services" dialog. (It goes into the onConnectionFailed method) could someone help resolve this? I don't know how to debug this further!

This is my code:

package com.example.ashwinpraveen1.googleapi;

import android.content.IntentSender;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.drive.Drive;





public class MainActivity extends ActionBarActivity implements GoogleApiClient.OnConnectionFailedListener,GoogleApiClient.ConnectionCallbacks{

    TextView checking;
    GoogleApiClient mGoogleApiClient;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        GDriveLogin();

    }

    @Override
    public void onConnected(Bundle connectionHint) {

        checking = (TextView) findViewById(R.id.checking);
        checking.setText("working");
    }

    void GDriveLogin(){

        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Drive.API)
                .addScope(Drive.SCOPE_FILE)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();
    }



    @Override
    public void onConnectionFailed(ConnectionResult connectionResult) {

        checking = (TextView) findViewById(R.id.checking);
        checking.setText("Not working");
        if (connectionResult.hasResolution()) {
            try {
                connectionResult.startResolutionForResult(this, 0);
            } catch (IntentSender.SendIntentException e) {
                // Unable to resolve, message user appropriately
            }
        } else {
            GooglePlayServicesUtil.getErrorDialog(connectionResult.getErrorCode(), this, 0).show();
        }
    }


    @Override
    public void onConnectionSuspended(int i) {

    }

    @Override
    protected void onStart() {
        super.onStart();
        mGoogleApiClient.connect();
    }
}

This is what the log shows:

02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi W/dalvikvm﹕ VFY: unable to resolve virtual method 11804: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi W/dalvikvm﹕ VFY: unable to resolve virtual method 11810: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi W/dalvikvm﹕ VFY: unable to resolve virtual method 9455: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
02-24 14:50:03.217  17329-17329/com.example.ashwinpraveen1.googleapi D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi W/dalvikvm﹕ VFY: unable to resolve virtual method 540: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi W/dalvikvm﹕ VFY: unable to resolve virtual method 562: Landroid/content/res/TypedArray;.getType (I)I
02-24 14:50:03.227  17329-17329/com.example.ashwinpraveen1.googleapi D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
02-24 14:50:03.327  17329-17329/com.example.ashwinpraveen1.googleapi D/libEGL﹕ loaded /vendor/lib/egl/libEGL_adreno.so
02-24 14:50:03.327  17329-17329/com.example.ashwinpraveen1.googleapi D/libEGL﹕ loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
02-24 14:50:03.337  17329-17329/com.example.ashwinpraveen1.googleapi D/libEGL﹕ loaded /vendor/lib/egl/libGLESv2_adreno.so
02-24 14:50:03.347  17329-17329/com.example.ashwinpraveen1.googleapi I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.2.1.5.04.03.00.191.009_msm8610_LNX.LA.3.2.1.5__release_AU ()
    OpenGL ES Shader Compiler Version: 20.00.05
    Build Date: 06/10/14 Tue
    Local Branch: mybranch3525181
    Remote Branch: quic/LNX.LA.3.2.1.5
    Local Patches: NONE
    Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.2.1.5.04.03.00.191.009 +  NOTHING
02-24 14:50:03.377  17329-17329/com.example.ashwinpraveen1.googleapi D/OpenGLRenderer﹕ Enabling debug mode 0
02-24 14:50:03.897  17329-17329/com.example.ashwinpraveen1.googleapi E/GooglePlayServicesUtil﹕ Internal error occurred. Please see logs for detailed information
02-24 14:51:22.487  17329-17329/com.example.ashwinpraveen1.googleapi E/GooglePlayServicesUtil﹕ Internal error occurred. Please see logs for detailed information
Boken
  • 4,825
  • 10
  • 32
  • 42
Ashwin Praveen
  • 661
  • 2
  • 10
  • 20
  • Does this come up at the application launch or when attempting to sign in? The 'GooglePlayServicesUtil﹕ Internal error occurred.' line in the logs suggests that your Google Play Services setup is faulty. You might want to put that to Google and see if anything comes up. – Finnboy11 Feb 25 '15 at 17:35
  • @Finnboy11 I do not even get a sign in screen, it just says "Unknown issue with google play services" when I launch the application. – Ashwin Praveen Feb 27 '15 at 04:09
  • Please see if either of these pages helps you: http://stackoverflow.com/questions/21280794/error-connectionresultstatuscode-internal-error-resolution-null/22738951#22738951 http://stackoverflow.com/questions/24836420/error-googleplayservicesutil-internal-error-occurred-please-see-logs-for-deta – Finnboy11 Feb 27 '15 at 17:07
  • @Finnboy11 k tried that, there doesn't seem to be a problem there. – Ashwin Praveen Feb 28 '15 at 01:46
  • If your Google+ setup is really ok then this gets a lot trickier... Are you using Eclipse or Android studio? – Finnboy11 Feb 28 '15 at 13:42
  • @Finnboy11 I'm on Android Studio. – Ashwin Praveen Feb 28 '15 at 16:08
  • 1
    Okay, I found a few Eclipse only issues that had a solution. So no luck there either. I see you have followed the directions at https://developers.google.com/drive/android/auth Can I assume that you have done everything displayed on that page, including the Developer Console setup. Please note that there are many links on that page, directing to guides that tell quite important things about setting up a Drive project. It is assumed that you know about their content too. – Finnboy11 Feb 28 '15 at 16:22
  • @Finnboy11 sorry for the late reply, I wasn't in the country! Could you briefly list out the steps? I'm pretty sure I have, but I might have missed something. – Ashwin Praveen Mar 04 '15 at 11:55
  • Before I do that, one more question. Does the error appear on a debug application or a release one? Have you tried creating a release version (signed version) of your apk and run that? – Finnboy11 Mar 05 '15 at 13:10
  • @Finnboy11 on a debug one, I have not tried with a release one. – Ashwin Praveen Mar 05 '15 at 13:12
  • Try generating a signed apk and run it. Google Play Games at least doesn't work on a debug version at all. The error message should be a bit different in case this was the reason, but no reason not to try. – Finnboy11 Mar 05 '15 at 18:16
  • @Finnboy11 I will try and put up an update. – Ashwin Praveen Mar 05 '15 at 18:18
  • @Finnboy11 I tried it with release one.. Still no luck, Ideas? – Ashwin Praveen Mar 08 '15 at 13:40
  • I'm afraid I'm out of tricks now. I'd still claim that the authorization fails either because the Developers Console setup is invalid or you are using the wrong fingerprint. In any case, the code you supplied here should be ok. – Finnboy11 Mar 08 '15 at 14:26
  • I'd double check that the version of Google Play Services installed on the device is the same (or newer) than the version of Google Play Services being used by your application. – Arthur Thompson Mar 23 '15 at 22:25
  • same problem: The Application is incorrectly configured. Check that the package name and signing certificate match the client ID created in the Developer Console. – Usman Jun 25 '15 at 04:32

0 Answers0