How can I put the cordova app in the Android games store?

If for this there is official documentation on the cordova, I could not find it and would be grateful for the link. I cordova run android to deploy on my phone. Everything looks good. Now, am I ready to turn this into an official app that users can download in the Android game store? When I create my application, it generates a file called "CordovaApp-debug.apk". This part of "debug" makes me think that this is the wrong file to work with, but I'm not sure how to create the right file.

+6
source share
1 answer

Deploy a hybrid app on the Google Play Store

These steps will work for Cordova, PhoneGap or Ionic. The only difference would be that wherever the cordova call is cordova , replace it with phonegap or ionic for your specific scenario.

Once you are finished and ready to deploy, follow these steps:

  • Open a command prompt window (terminal on macOS and Linux or command prompt on Windows).

  • Go to / path / to / your / project /, which we will call the root of the project.

  • At the root of the project, remove the Console plugin from your set of plugins.

    Command: cordova plugin rm cordova-plugin-console

  • While still at the root of the project, use the cordova build command to create an APK to distribute the release.

    Team: cordova build --release android

  • The above process creates a file called android-release-unsigned.apk in the folder ProjectRoot/platforms/android/build/outputs/apk/

  • Sign and align the APK using the instructions https://developer.android.com/studio/publish/app-signing.html#signing-manually

    At the end of this, the APK step you receive can be downloaded to the Play Store.

Note: As a newbie or newbie, the last step can be a bit confusing, as for me. You may encounter several problems and ask some questions regarding what these commands are and where to find them.

Q1. What are jarsigner and keytool?
Ans: Android subscription instructions tell you specifically what jarsigner and keytool are , but that doesn’t tell you where to look for them if you run the “command not found error” command line window.

Thus, if you added the Java Development Kit (JDK) to the PATH variable, simply execute the commands, as in the Guide. BUT, if you do not have it in your PATH, you can always access them from the bin folder of your JDK installation.

Q2. Where is the zipalign?
Ans: There is a high probability of not finding the zipalign command and getting the "not found error" command. You are likely to be googling zipalign and where to find it?

The zipalign utility is present in the Android SDK installation folder. On macOS, the default location is at, user-name/Library/Android/sdk/ . If you navigate to the folder, you will find a bunch of other folders like docs , platform-tools , build-tools , tools , add-ons ...

Open the build-tools folder. cd build-tools . There will be several folders that will be versioned according to the chain of build tools that you use in the Android SDK Manager. ZipAlign is available in each of these folders. I personally go to the folder with the latest version. Open any.

On macOS or Linux, you may have to use ./zipalign instead of just typing in zipalign , as mentioned in the documentation. On Windows, zipalign pretty good.

+12
source

Source: https://habr.com/ru/post/979477/


All Articles