読者です 読者をやめる 読者になる 読者になる

ボクココ

サービス開発を成功させるまでの歩み

Error: java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker

In current project, I'm using Google Drive API.
It enables us to utilize google resources.

I got the following error when I was using it.


FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker
at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.newChooseAccountIntent(GoogleAccountCredential.java:171)

The reason was simple..

We need to import google-play-services-lib.

import -> existing android code -> /extras/google/google_play_services/libproject/google-play-services_lib

If you cannot find it, you need to install it from android sdk manager.


Then your project properties -> Android -> Library -> Add -> select google-play-services_lib.


It'll be solved!