Add Google Play service to an Android library project in Android studio -


i have library project foolib uses google play service (location service). when using eclipse, have google-play-services-lib (also library project) in workspace , include in foolib, , working fine. migrating android studio , not figure out way include google play service in library project. here have done far:

  1. installed google player service, google repository in sdk manager. (i using latest android studio 1.0.1)

enter image description here
2. added compile 'com.google.android.gms:play-services:6.5.+' build.gradle file foolib under dependencies. sync gradle file. here guild.gradle file

apply plugin: 'com.android.library'  android {       compilesdkversion 21       buildtoolsversion "21.1.2"      defaultconfig {         minsdkversion 8         targetsdkversion 21     }      buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt'         }     } }  dependencies {       compile 'com.google.android.gms:play-services:6.5.+'       compile files('libs/aws-android-sdk-1.5.0-core.jar')   } 
  1. the official doc (http://developer.android.com/google/play-services/setup.html) mentioned need add

    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

to manifest child of <application> tag. in manifest file library project, there no <application> tag. tried without meta-data tag or adding dummy <application> tag in manifest , attached meta-data tag it. neither case works.

i tried both androidmanifest files below
enter image description here
or
enter image description here

i still getting
enter image description here

does know how add google play service library project in android studio? appreciated!


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -