Gmail API for Android SDK 21 -


i trying develop using gmail api android devices api 21. in tutorial: https://developers.google.com/gmail/api/quickstart/android says need have:

android sdk packages api 23 or later, including latest versions of google repository, android support library , google play services.

and dependencies example there is:

dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.google.android.gms:play-services-auth:9.0.2' compile 'pub.devrel:easypermissions:0.1.5' compile('com.google.api-client:google-api-client-android:1.22.0') {     exclude group: 'org.apache.httpcomponents' } compile('com.google.apis:google-api-services-gmail:v1-rev47-1.22.0') {     exclude group: 'org.apache.httpcomponents' }  } 

but error when use saying cant use: com.android.support:appcompat-v7:23.4.0 when compile sdk version 21.

i've tried changing appcompact version v7:21.0.2 worked me before, when sync gradle files error:

error: failed resolve: com.android.support:appcompat-v7:23.1.1
install repository , sync project
open file
show in project structure dialog

but installing repository create problem of support library not matching compile version.

am doing wrong?

you can try go sdk manager , install 3 component: google repository, android support library , google play services. following picture: enter image description here


Comments