How to import gms to our project - using Android.mk

1. Download google play services using sdk Manager.
2. Copy the library project to the location where maintain your android app projects.
3. In Eclipse, import it. File->Import, select Android > Exsting Android Code into Workspace, add browser to the copy of the library project to import it.
4. Right click this project, select Export > JAR file, select gen and src directory, diselect other directories, like the attachments, click finish.
5, Copy this generated jar file(for example, google-play-services_lib.jar) and libs/google-play-services.jar to camera project's jarlib directory.
6. Edit Android.mk of camera project, add these lines:
    LOCAL_STATIC_JAVA_LIBRARIES += googleplayservices
    LOCAL_STATIC_JAVA_LIBRARIES += googleplayservices_lib

    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += googleplayservices_lib:jarlib/google-play-services_lib.jar
    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += googleplayservices:jarlib/google-play-services.jar
7. Copy res/values/version.xm under gms project to camera project res/values/ directories.
8. Edit AndroidManifest.xml of camera project, add the following tag as a child of the <application> element:
    <meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
9. If you encounter proguard issue, copy these directories under android-sdk/tools/proguard/ to external/proguard, replace old one(make sure version under android sdk is newer than those unser android source):
    bin/ lib/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值