Google Drive Android API tutorial issue -
following this tutorial, pasted code main activity:
@override public void onconnectionfailed(connectionresult connectionresult) { if (connectionresult.hasresolution()) { try { connectionresult.startresolutionforresult(this, resolve_connection_request_code); } catch (intentsender.sendintentexception e) { // unable resolve, message user appropriately } } else { googleplayservicesutil.geterrordialog(connectionresult.geterrorcode(), this, 0).show(); } }
i end having import buncha libraries, still can't fix error:
resolve_connection_request_code cannot resolved variable
any ideas??? can't figure out library contains constant...
turns out when tutorial specifies start android project, mean google drive android project, has different imports , class definitions, aren't made clear tutorial. give starter code google drive android project, mislabeled "android quickstart" assumed no different other android project.
here's link goes: google drive android quickstart, , tutorial makes alot more sense if use code reference.
if curious fix original issue is, constant should request_code_resolution
, again, there alot more changes use google drive android quickstart
Comments
Post a Comment