问题
How to include the Google Java Client API in Android Studio...possibly via gradle? Also, I want to manage Google Contacts...so which other library can I include and how? Thanks
回答1:
The documentation for setting up the Google Java client APIs is at https://code.google.com/p/google-http-java-client/wiki/Setup. Looking at their Maven coordinates for the Android client libraries, the relevant coordinate string is com.google.http-client:google-http-client-android:1.18.0-rc
. You can go to Project Structure > Modules > Dependencies > + > Library dependency and add it there.
For managing Google Contacts, start with the ContactsContract
API and follow the docs from there: http://developer.android.com/reference/android/provider/ContactsContract.html
来源:https://stackoverflow.com/questions/23076102/best-way-to-include-google-java-client-api-with-google-contacts-in-android-studi