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:
- installed google player service, google repository in sdk manager. (i using latest android studio 1.0.1)
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') }
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
or
i still getting
does know how add google play service library project in android studio? appreciated!
Comments
Post a Comment