I start with google drive sdk. I follows steps which describe in that post.
But I face problem in Step 3: Create and Configure an Android Project
I cant find options in my eclipse so I add plugins for google. After installation of plugins, Eclipse give errors and we now update my SDK also. So for that I update my SDK but now All projects giving me error in eclipse. I cant run any projects. So I use my old SDK back.
Now I stuck with this How to create Project for Google Drive and how to integrate it.
I need to upload file from my android application to Google Drive.
Please help me to find this.
EDIT
Now I successfully create project with error free. But when I run project it give me following errors.
12-12 11:05:08.788: E/AndroidRuntime(377): java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
12-12 11:05:08.788: E/AndroidRuntime(377): at com.rarenoice.screen.MainActivity.onCreate(MainActivity.java:42)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.os.Looper.loop(Looper.java:123)
12-12 11:05:08.788: E/AndroidRuntime(377): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-12 11:05:08.788: E/AndroidRuntime(377): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 11:05:08.788: E/AndroidRuntime(377): at java.lang.reflect.Method.invoke(Method.java:521)
12-12 11:05:08.788: E/AndroidRuntime(377): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-12 11:05:08.788: E/AndroidRuntime(377): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-12 11:05:08.788: E/AndroidRuntime(377): at dalvik.system.NativeStart.main(Native Method)
At Following line :-
private GoogleAccountCredential credential;
credential = GoogleAccountCredential.usingOAuth2(MainActivity.this,
DriveScopes.DRIVE);
There are two ways to upload files to Google Drive: Drag-and-drop files. If you're using the latest versions of Chrome or Firefox, you can simply drag-and-drop files directly from your computer into Google Drive. You can even drag-and-drop files directly into folders or sub-folders.
You need to add the Google Play Services jars to your project, as explained in Step 3 of the quickstart guide you are following.
You can also watch this video where I go through all the steps to build the same quickstart application for Android: http://www.youtube.com/watch?v=Ied1CjJ0iP0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With