Day 29 - 上架 App 到 Google Play Store for Android TV Part 2

昨天成为 Android TV 开发者後
我们可以来上架啦

因为这次铁人赛的资料来源来自威秀影城
版权的关系我另新开一个专案来示范上架

大家可以用自己的专案来练习上架喔
上架前必须先检查自己的 App 是否符合 Google Play Store for Android TV 的规范
可以参考这篇官方文件<<发布到 Android TV 平台>>

LEANBACK_LAUNCHER

首先确认 AndroidManifest.xml 里的起始 Activity,<category>的部分是否为 LEANBACK_LAUNCHER

<activity android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </intent-filter>
</activity>

Android TV 不应该是触控萤幕

官方文件提到

Your app must declare that it does not require a touchscreen. The manifest must declare the android.hardware.touchscreen hardware with android:required="false". Learn more about declaring hardware requirements.

因为目前电视盒及 Android TV 都是用遥控器来操作没有触控,因此会需要加上这个条件
一样在 AndroidManifest.xml 里 <application> 外加上以下片段

<uses-feature android:name="android.hardware.touchscreen"
        android:required="false"/>

打包签名 APK

  1. 点击 Toolbar 上的 Build -> Generate Signed Bundle / APK...
    https://ithelp.ithome.com.tw/upload/images/20201014/201071656zLKF3ulvz.png
  2. 选择下面 APK -> Next
    https://ithelp.ithome.com.tw/upload/images/20201014/201071656WxZN5P5ow.png
  3. 如果已经有 Key Store 的可以直接载入,这边会重新教学如何产生 Key Store,点击 Create new...
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165AhF3E8dFlv.png
  4. 选择你 Key Store 的存放资料夹 -> OK
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165YM4jQ9hIMn.png
  5. 输入 Key Store 的资讯
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165jb6KAdsus9.png
    • 第一个密码是开启 Key Store 的密码
    • 第二个是密钥的密码
    • Alias 是别名,没有硬性规定,喜欢什麽填什麽
    • Validity (years) 是指 Key Store 的年限,一旦 App 上架了,到下架前都要用这把 Key Store 所以年限通常都会拉久一点
    • 下面就是一些基本资料,把它填一填
    • 填完按下 OK
  6. 创建完 Key Store 後回到刚刚页面会自动帮你填入,如果你懒的记就勾选 Remember passwords 吧 -> Next
    https://ithelp.ithome.com.tw/upload/images/20201014/201071653KdEGvlyIM.png
  7. 因为是要上 Google Play Store 的,请在 Build Variants 的选单中点选 release 下方的 Signature Versions 要把两个都勾上,否则上架时会出错,选好之後点击 Finish
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165dVRyHld2cx.png
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165EemwuQFXok.png
  8. 等带进度条跑完
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165nMOoJTloqH.png
  9. APK就完成打包罗
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165qr8RwzvlIm.png

Google Play Console

  1. 进到 Google Play Console 并点选 前往 Play 管理中心
  2. 在所有应用程序页签中点选右方建立应用程序
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165RzLS0I4bWu.png
  3. 填写应用程序详细资料,包括应用程序名称预设语言应用程序或游戏 等内容,填写完毕後点选右下方 建立应用程序
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165664cY1PxV3.png
  4. 接着在左侧选单 正式版 中点选右上方 建立新版本
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165vAsEhnkxxn.png
  5. 将刚刚打包好的 APK 上传上来
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165S66LHfbL4f.png
  6. 上传成功後下方版本详细资讯会自动带入,接着填入版本资讯等内容,按下储存
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165s8KjwPZYDb.png
  7. 按下储存後会右下方会变成 Focus 在 检查版本,给他点下去
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165xAMy2zRoa6.png
  8. 接下来 Google Play Console 会检查你的商店资讯和 APK 相关资讯。那这边因为我们第一次新建应用程序,所以还有一些地方需要完成,所以依照提示点击 前往资讯主页
    https://ithelp.ithome.com.tw/upload/images/20201014/20107165WvZzQ0lPcE.png

<<:  Day28 - HTML 与 CSS (10) - 网页设计

>>:  [ Day:29 ] GitHub Actions 懒人部署 - 如何安装多个来源的 npm package

如何快速复制 (clone) 20 TB SQL Server 资料库 - 心得分享

DBA Bootcamp 几个月前,Business Intelligence 部门跑来跟 DBA ...

[Day8] 有意识地沟通:每个成员都有自己的功课

喜与忧平等重要 平等对待好事坏事,反覆练习揭露,知道Why 终於开始要与成员互动了,今天我要分享一个...

[Day30] 前面就是终点,该写什麽呢?

要不要自己加赛到 42 天?还是乖乖完赛就好? 记得以前还是跑者的时候,练跑距离大概都维持在 8 公...

Alpine Linux Porting (一点九?)

最近睡太少身体开始亮红灯Orz 来逐步解剖一下Alpine initramfs的init scrip...

Day_13 : 让 Vite 来开启你的Vue 之 Option API 与 Mixins

Hi Dai Gei Ho~ 我是Winnie~ 在昨天的文章中,我们有简单的提到 Composit...