打包android wear 应用程序 Package with Android Studio
2016-02-03 17:13
381 查看
Package with Android Studio
To properly package a wearable app in Android Studio:Include all the permissions declared in the manifest file of the wearable app module in the manifest file of the handheld app module. For example, if you specify the
VIBRATEpermission
for the wearable app, you must also add that permission to the handheld app.
Ensure that both the wearable and handheld app modules have the same package name and version number.
Declare a Gradle dependency in the handheld app's
build.gradlefile that points to the wearable app module:
dependencies { compile 'com.google.android.gms:play-services:5.0.+@aar' compile 'com.android.support:support-v4:20.0.+'' wearApp project(':wearable') }
Click Build > Generate Signed APK... and follow the on-screen instructions to specify your release keystore and sign your app. Android Studio exports the signed handheld app with the wearable app embedded in
it automatically into your project's root folder.
上面是官方的guide,
如果仅仅是做一个测试,android studio 已经为我们做了东西。
我们要做的仅仅是
1:在创建工程的时候勾选上wear,
2:删除掉gradle 里面和google play service 相关的东西,
3:然后执行上面第四步就可以了。
相关文章推荐
- android 样式开发
- android 之截屏
- 单独编译使用WebRTC的音频处理模块 - android
- Android 内存泄漏总结
- Android相机开发那些坑
- Android 异步消息处理机制 让你深入理解 Looper、Handler、Message三者关系
- Android RecycleView(三)——增加点击事件
- android实现只切换本应用的语言(不切换android 系统语言)
- Android Studio 使用小技巧 持续更新
- 安卓开发——AndroidStudio生成getter,setter,tostring,constructor等函数的方式
- Android 监听返回键、HOME键
- 关于Ubuntu12.04编译环境搭建问题
- Android adb 使用
- android studio 2.0下 jni开发环境的搭建
- Android关于Fragment长期置于后台返回重叠的问题
- android开发属性精解
- Android Studio之导出JavaDoc出现编码GBK的不可映射字符
- Android 沉浸式状态栏 一体化状态栏实现
- Android Jni开发之交互处理
- Android AIDL IPC实现进程间通信