建立 Android 游戏项目的必备 XxxManifest.xml 配置
2015-09-11 11:07
429 查看
设置项目 build 的 sdk 版本为最新的
设置 minSdkVersion 属性为最低支持版本
在<manifest>元素中添加installLocation属性为preferExternal
在<application>元素中添加 largeHeap 为 true
在<application>元素中添加 persistent 为 true
在<application>元素中添加 debuggable 属性并设置为 true
在<application>元素中添加 hardwareAccelerated 为 true
在<activity>元素中设置 screenOrientation 属性为需要的方向(横向 landscape 或纵向 portrait )
在<activity>元素中设置configChanges属性为 android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
根据游戏风格设置是否全屏 android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
添加2个权限 <uses-permission> 元素 name 值为 android.permission.WRITE_EXTERNALSTORAGE 和 android.permission.WAKE_LOCK
在<uses-sdk>元素中设置 targetSdkVersion 属性为你的目标 sdk 版本
在<manifest>元素下添加子
设置 minSdkVersion 属性为最低支持版本
在<manifest>元素中添加installLocation属性为preferExternal
在<application>元素中添加 largeHeap 为 true
在<application>元素中添加 persistent 为 true
在<application>元素中添加 debuggable 属性并设置为 true
在<application>元素中添加 hardwareAccelerated 为 true
在<activity>元素中设置 screenOrientation 属性为需要的方向(横向 landscape 或纵向 portrait )
在<activity>元素中设置configChanges属性为 android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
根据游戏风格设置是否全屏 android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
添加2个权限 <uses-permission> 元素 name 值为 android.permission.WRITE_EXTERNALSTORAGE 和 android.permission.WAKE_LOCK
在<uses-sdk>元素中设置 targetSdkVersion 属性为你的目标 sdk 版本
在<manifest>元素下添加子
<supports-screens android:resizeable="true" android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" />
相关文章推荐
- Android插件实例——360 DroidPlugin详解
- android --解决GridView上下滑动出现错位问题
- Android Studio之代码混淆
- Android Fragment 真正的完全解析(下)
- Android Fragment 真正的完全解析(上)
- 有哪些 Android 大牛的 blog 值得推荐?
- android系统通过图片绝对路径获取URI的三种方法
- Android第四十八期 - SwipeMenuListView
- Android第四十八期 - SwipeMenuListView
- android如何保存相册后显示
- Android 布局学习之——LinearLayout属性baselineAligned的作用及baseline
- Android 常用第三方库(长期更新)
- Ionic Android开发环境搭建 下
- Android菜单,仿人人客户端侧滑效果,史上最简单的侧滑实现
- 学习Android开发的二十套免费理想资源
- Android 中 Handler 引起的内存泄露
- Android -- getWidth()与getMeasuredWidth()
- android中handler用法总结
- android-仿ios纯数字软键盘
- 详解Android SurfaceFinger服务