Following this tutorial , I introduced this code into my main activity:
@Override public void onConnectionFailed(ConnectionResult connectionResult) { if (connectionResult.hasResolution()) { try { connectionResult.startResolutionForResult(this, RESOLVE_CONNECTION_REQUEST_CODE); } catch (IntentSender.SendIntentException e) { // Unable to resolve, message user appropriately } } else { GooglePlayServicesUtil.getErrorDialog(connectionResult.getErrorCode(), this, 0).show(); } }
I need to import buncha libraries, but I still cannot fix this error:
RESOLVE_CONNECTION_REQUEST_CODE cannot be resolved to a variable
any ideas ??? I can’t figure out which library contains this constant ...
android google-drive-android-api
woojoo666
source share