我試圖運行此以下行如何在java中創建一個集合<String>出單個字符串?
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE);
,並得到這個錯誤:
The method usingOAuth2(Context, Collection<String>) in the type GoogleAccountCredential is not applicable for the arguments (GoogleDriveProxeyActivity, String)
然後我改變了代碼,以這樣的:
credential = GoogleAccountCredential.usingOAuth2(this, Arrays.asList(DriveScopes.DRIVE.split(",")));
但是有一個更簡單的方法發送適當類型的參數?
不,它不是。 –