欧洲杯官网投注

Ionic Docs Docs

Native

Search docs/
Search docs/
Ionic Docs Docs
  • Structure
  • Responsive Grid
  • Global StylesheetsCSS Utilities
  • Basics
  • Platform Styles
  • CSS VariablesColorsThemesDark ModeAdvancedColor Generator
  • Overview
  • Build Your First App
    LifecycleNavigation/RoutingConfigPlatformTestingStoragePerformanceProgressive Web Apps
  • Overview
  • Quickstart
  • Build Your First App
    LifecycleNavigation/RoutingConfigPlatform UtilsProgressive Web AppsTesting
  • Overview
  • Build Your First App
  • LifecycleNavigation/Routing
  • Animations
  • Gestures
  • iOS App Store
  • Android Play Store
  • Progressive Web App (PWA)
  • Electron Desktop App
  • Security
  • Debugging
  • Build ErrorsRuntime ErrorsNative ErrorsCORS Errors
  • Fundamentals
  • Cross PlatformWeb ViewWhat are PWAs?
  • How to Contribute
  • Code of Conduct
  • Glossary
  • VersioningRelease NotesGitHub Changelog
  • Support Policy
  • Browser Support
  • Migration
  • Books
  • CoursesGuidesPostsToolsVideos
    Android Play Store Deployment
    Contents

    Generating a release build of an app

    To generate a release build for Android, run the following cli command:

    $ ionic cordova build android --prod --release

    This will generate a release build based on the settings in theconfig.xml in theplatforms/android/app/build/outputs/apk directory of an app.An Ionic app will have preset default values in this file but this can be changed to customize builds.

    Signing an APK

    First, the unsigned APK must be signed. If a signing key has already been generated, skip these steps and use that one instead.Generate a private key using the keytool command that comes with the Android SDK:

    $ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

    Once that command has been ran and its prompts have been answered a file calledmy-release-key.keystore欧洲杯官网投注 will be created in the current directory.

    WARNING: Save this file and keep it somewhere safe. If it is lost the Google Play Store will not accept updates for this app!

    To sign the unsigned APK, run the jarsigner tool which is also included in the Android SDK:

    $ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name

    Finally, the zip align tool must be ran to optimize the APK.Thezipalign tool can be found in/path/to/Android/sdk/build-tools/VERSION/zipalign.For example, on macOS with Android Studio installed,zipalign is in~/Library/Android/sdk/build-tools/VERSION/zipalign:

    $ zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

    欧洲杯官网投注This generates a final release binary called HelloWorld.apk that can be accepted into the Google Play Store.

    Submitting an app to the Google Play Store

    欧洲杯官网投注Now that a release APK has been generated, a Play Store listing can be written and the APK can be uploaded.

    To start, visit the Google Play Store Developer Console and create a new developer account.

    Making a developer account with Google Play costs $25 USD.

    Once a developer account has been created, go ahead and click theCreate an Application

    Create an App button

    欧洲杯官网投注Be sure to fill out the description for the app along with providing screenshots and additional info.When ready, upload the signed release APK that was generated and publish the app.

    Updating an app

    As an app evolves, it will need to be updated with new features and fixes. An app can be updated by either submitting a new version to the Google Play Store, or by using a live update service like Ionic Appflow's Live Update feature. Using Live Updates, changes can be pushed directly to users from the Ionic Appflow dashboard, without submitting changes to the Play Store. Learn more about Live Updateshere.

    欧洲杯官网投注In order for the Google Play Store to accept updated APKs, the config.xml file will need to be edited to increment the version value, then rebuild the app for release following the instructions above.

    Previous
    iOS App Store
    Next
    Progressive Web App (PWA)