Android

Android export.

You have several options when exporting your app for Android:

  • Binary app (.apk or .aab) – this Android binary version can be published to Google Play.
    When ready, your .aab package, for example, will look like this:

👍

Important: Publishing with the Android App Bundle (.aab)

Note that starting from August 2021, new apps are required to publish with the Android App Bundle (.aab) on Google Play.
Please read more here.

  • Android Studio project (source code) – you get HTML/CSS/JS, and the Cordova library configured as an Android Studio project. If you decide to build for Android Studio, you will get the .zip file:

Once your project is generated, the QR-Code can be used to upload the application to your device or save the file for further use.

Binary App

The Appery.io platform provides a cloud-based building app service that is programmed as a Cordova app for Android, which you can publish to the Google Play store.

To start the build process, simply click Export > Binary):

Note that building the binary file could take a while.

Once the build is completed, the file can be downloaded and you can also see a QR code:
You can now scan the QR code shown to start the download of the binary file on your Android device:

Android Certificate File

To build an Android binary file, your account should have at least one certificate file. To create a certificate file go to Resources > Certificates and click the Generate certificate button. A default certificate will be generated which will be used in the generation of a binary file. This should resolve most Certificate not set errors.

👍

Video Tutorial: How to Create Android and iOS Certificates

You can check this Appery.io Community video that shows how to create Android and iOS certificates:

🚧

Google Play Account

Before you can publish your app to the Google Play store you will need to pay a $25 registration fee.

🚧

Publishing on Google Play Store

Publishing an app to Google Play Store can only be done by you. We don't have access to your account and can't publish apps on your behalf.

Binary File Settings

Appery.io comes with an editor that allows you to enter and edit all necessary Android .apk properties in order to prepare it for the Google Play store. To open the editor, go to Project view > Project > App settings > Android binary. By default, the Debug type is set that is used for testing purposes. To enable the Release mode, for the Build type, select from the Release (APK) or Release (AAB) (required for Cordova Android 9.0.0) options:

If the Release option is selected, JavaScript assets will be reduced to the binary size.

❗️

Key Store File

Keep the key store file containing your private key and certificate information in a safe, secure place. If you delete your Appery.io app, this information will be impossible to restore, even from the project backup. More information can be found here.

Building with Android Studio or Eclipse

📘

Note

You can also build a binary file outside of Appery.io with Android Studio or Eclipse. To do it, follow their official recommendations.

Building with Android Studio

Building with Android Studio is very simple:

  1. In the Builder, click the EXPORT button and then select Android Studio project:
  1. When the build is ready, click OK to save the .zip file to your drive (here, it's the QuizApp folder):
  1. Then, extract it.
  2. Start Android Studio.
  3. Click File > Open to search for the exported and unzipped project (note the correct path: ...\app\platforms\android:
  1. Wait while the Gradle is loading.
  2. Click Build > Make Project:
  1. Check to see it's built:
  1. See the .apk file in the folder with your project QuizApp\platforms\android\app\build\outputs\apk\debug (QuizApp - the folder with your exported project from step #2).

🚧

Debug vs Release

Note that you can build two versions of the app but work with them is different in Android Studio: debug and release.

Note as well that starting from August 2021, new apps are required to publish with the Android App Bundle (.aab) on Google Play.
Please read more here.

After building an Android Studio project, you can browse the app resources, source files, and see the overall project structure: https://developer.android.com/studio/run.

Setting up Eclipse Project

Here are the steps on how to properly configure the project for Eclipse:

  1. Extract the archive into the DIR folder.
  2. Create an empty BarcodeScanner directory at the DIR folder.
  3. Go to DIR/<project_name>/repo/com/phonegap/plugins/BarcodeScanner/1.0.
  4. Find BarcodeScanner-1.0.apklib file. It’s a ZIP-file with apklib extension. Unpack this file into DIR > BarcodeScanner directory.
  5. Open Eclipse
  6. Import the BarcodeScanner:
  • Select File > Import menu.
  • Select Android > Existing Android Code into Workspace.
  • Click Next.
  • Select DIR > BarcodeScanner as root directory.
  • Click Finish
  • CapruteActivity project appears as your Eclipse workspace.
  • Right-click the mouse button and select Properties on the menu.
  • Go to Android section.
  • Check 4.1.2 Android platform.
  • Make sure that the Is Library checkbox is checked at the bottom.
  • Click Ok.
  • Clean CaptureActivity by clicking Project - Clean (Clean all).
  • CaptureActivity shouldn’t have any error at the moment.
  1. Import your app:
  • Click File > Import.
  • Click General > Existing Project into workspace.
  • Select your app directory as DIR > <project_name>.
  • Import your project.
  • Clean projects by clicking Project - Clean (Clean all).
  • All your projects should be valid and have no errors.

📘

jQuery Mobile Apps

If you are building a JQM app that has a library version lower than 3.0, you can export it as an Eclipse project.

The following is a list of the most common reasons the Android build might fail. Please correct them and try to export again:

Troubleshooting Android Builds

  1. The custom certificate is uploaded, but the app is trying to build with the auto-generated certificate. If you have uploaded a custom certificate, make sure the auto-generated certificate isn’t selected.
  2. Changes made in the Source view. If you’ve made any changes in the Source view, this might be causing the build to fail. Delete the edited files, then select the gear icon, and “Undo all source changes” for the Android folder.
  3. App icons: Double check that all the app icons you uploaded are in the correct format and have the correct names.

Known Build Bugs

There are two known bugs that may cause the build to fail:

  1. Changing the package name. If you changed the app package name and the build now fails, switch to Source view. For the Android folder, select the gear icon, then Undo all source changes. Try to export again.
  2. Missing certificate. Click Change for the Keystore file and select the certificate. Try to export again.