Android 简明教程
Publishing Android Application
Android 应用程序发布是一个过程,可以让您的 Android 应用程序面向用户。感染是 Android 应用程序开发过程的最后一个阶段。
Android application publishing is a process that makes your Android applications available to users. Infect, publishing is the last phase of the Android application development process.
Android development life cycle
一旦您开发并充分测试了您的 Android 应用程序,您就可以开始使用 Google Play(一个著名的 Android 市场)免费销售或分发。您还可以通过将应用程序直接发送给用户或让用户从您自己的网站下载应用程序来发布您的应用程序。
Once you developed and fully tested your Android Application, you can start selling or distributing free using Google Play (A famous Android marketplace). You can also release your applications by sending them directly to users or by letting users download them from your own website.
您可以在 Android 官方网站上查看详细的发布过程,但本教程将指导您完成在 Google Play 上发布应用程序的简单步骤。这里有一个简化的检查清单,将帮助您发布您的 Android 应用程序−
You can check a detailed publishing process at Android official website, but this tutorial will take you through simple steps to launch your application on Google Play. Here is a simplified check list which will help you in launching your Android application −
Step |
Activity |
1 |
Regression Testing Before you publish your application, you need to make sure that its meeting the basic quality expectations for all Android apps, on all of the devices that you are targeting. So perform all the required testing on different devices including phone and tablets. |
2 |
Application Rating When you will publish your application at Google Play, you will have to specify a content rating for your app, which informs Google Play users of its maturity level. Currently available ratings are (a) Everyone (b) Low maturity (c) Medium maturity (d) High maturity. |
3 |
Targeted Regions Google Play lets you control what countries and territories where your application will be sold. Accordingly you must take care of setting up time zone, localization or any other specific requirement as per the targeted region. |
4 |
Application Size Currently, the maximum size for an APK published on Google Play is 50 MB. If your app exceeds that size, or if you want to offer a secondary download, you can use APK Expansion Files, which Google Play will host for free on its server infrastructure and automatically handle the download to devices. |
5 |
SDK and Screen Compatibility It is important to make sure that your app is designed to run properly on the Android platform versions and device screen sizes that you want to target. |
6 |
Application Pricing Deciding whether you app will be free or paid is important because, on Google Play, free app’s must remain free. If you want to sell your application then you will have to specify its price in different currencies. |
7 |
Promotional Content It is a good marketing practice to supply a variety of high-quality graphic assets to showcase your app or brand. After you publish, these appear on your product details page, in store listings and search results, and elsewhere. |
8 |
Build and Upload release-ready APK The release-ready APK is what you you will upload to the Developer Console and distribute to users. You can check complete detail on how to create a release-ready version of your app: Preparing for Release. |
9 |
Finalize Application Detail Google Play gives you a variety of ways to promote your app and engage with users on your product details page, from colourful graphics, screen shots, and videos to localized descriptions, release details, and links to your other apps. So you can decorate your application page and provide as much as clear crisp detail you can provide. |
Export Android Application Process
Apk development process
在导出应用程序之前,您必须使用一些工具
Before exporting the apps, you must some of tools
-
Dx tools(Dalvik executable tools ): It going to convert .class file to .dex file. it has useful for memory optimization and reduce the boot-up speed time
-
AAPT(Android assistance packaging tool):it has useful to convert .Dex file *to.Apk*
-
APK(Android packaging kit): The final stage of deployment process is called as .apk.
在将应用上传到 Google Play 应用商店之前,您需要将其导出为 APK(Android 软件包)文件。
You will need to export your application as an APK (Android Package) file before you upload it Google Play marketplace.
要导出应用,只需在 Android Studio 中打开该应用项目,然后从 Android Studio 中选择 Build → Generate Signed APK 并按照简单步骤导出您的应用 −
To export an application, just open that application project in Android studio and select Build → Generate Signed APK from your Android studio and follow the simple steps to export your application −
然后,选择 Generate Signed APK 选项,如上图所示,然后单击它,以便您获得以下屏幕,您可以在其中选择 Create new keystore 以存储您的应用。
Next select, Generate Signed APK option as shown in the above screen shot and then click it so that you get following screen where you will choose Create new keystore to store your application.
输入密钥仓库路径、密钥仓库密码、密钥别名和密钥密码以保护您的应用,并再次单击 Next 按钮。它将显示以下屏幕,让您可以创建应用 −
Enter your key store path,key store password,key alias and key password to protect your application and click on Next button once again. It will display following screen to let you create an application −
一旦您填写完所有信息,如应用目标位置、构建类型和风格,请单击 finish 按钮,在创建应用时,它将显示如下所示
Once you filled up all the information,like app destination,build type and flavours click finish button While creating an application it will show as below
最后,它将以 APK 格式文件生成您的 Android 应用,该文件将上传到 Google Play 应用商店。
Finally, it will generate your Android Application as APK formate File which will be uploaded at Google Play marketplace.
Google Play Registration
最重要的一步是使用 Google Play Marketplace 注册 Google Play。如果您有现有的 Google ID,则可以使用该 ID,否则您可以创建新的 Google ID,然后在应用商店中注册。您将获得以下屏幕以接受条款和条件。
The most important step is to register with Google Play using Google Play Marketplace. You can use your existing google ID if you have any otherwise you can create a new Google ID and then register with the marketplace. You will have following screen to accept terms and condition.
您可以使用 Continue to payment 按钮继续支付 25 美元的注册费,并最终完成您的账户详细信息。
You can use Continue to payment button to proceed to make a payment of $25 as a registration fee and finally to complete your account detail.
一旦您成为 Google Play 的注册用户,您就可以为您的应用上传 release-ready APK ,最后,您将使用应用详细信息页面(如上述清单第 9 步中所述)完成应用详细信息。
Once you are a registered user at Google Play, you can upload release-ready APK for your application and finally you will complete application detail using application detail page as mentioned in step 9 of the above mentioned checklist.
Signing Your App Manually
您不需要 Android Studio 来对您的应用进行签名。您可以使用 Android SDK 和 JDK 中的标准工具从命令行对您的应用进行签名。从命令行以发布模式对应用进行签名 −
You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line −
-
Generate a private key using keytool
$ keytool -genkey -v -keystore my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
-
Compile your app in release mode to obtain an unsigned APK
-
Sign your app with your private key using jarsigner
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1
-keystore my-release-key.keystore my_application.apk alias_name
-
Verify that your APK is signed. For example −
$ jarsigner -verify -verbose -certs my_application.apk
-
Align the final APK package using zipalign.
$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
Some of App markets
-
[role="bare"]https://f-droid.org/F-Droid