"Failed to build the native mobile app" error when creating the Android APK package

When you use the PowerServer Package tool to create the Android APK package, the following error occurs during the packaging process: "Failed to build the native mobile app!".

Solution:

Step 1: Make sure the settings (especially the following ones) are correctly specified in the Package tool.

  • App Identifier should be specified in the format similar to the domain name e.g. sales.appeon.com. It can only contain letters, or a combination of letters with dots, and/or numbers without spaces, but cannot start or end with dots and contain numbers between dots.

  • Both the Alias and Alias Password settings should match with the keystore file that you specified to use. If you use the default keystore file provided by Appeon, the values of both fields should be appeon.

If the settings are correct, then the JDK under the PowerServer Toolkit directory is possibly destroyed, which causes this error.

Step 2: Run the command below in the cmd window to check if the JDK under the PowerServer Toolkit directory is working.

cd C:\Program Files\Appeon\PowerServer\Toolkit\Java\Jdk1.6.0_24\bin
java

The execution result of the command should look similar to that in the following figure.

JDK Java command

If the execution result is different from what is shown in the figure, the JDK is probably destroyed. In this case, we would recommend you to reinstall PowerServer Toolkit or copy a valid JDK into the PowerServer Toolkit directory such as "C:\Program Files\Appeon\PowerServer\Toolkit\Java\Jdk1.6.0_24". If you choose to copy a JDK to the PowerServer Toolkit directory, please pay attention to the following two notes:

  • The directory structure of the JDK to be copied to the PowerServer Toolkit directory should be consistent with that of the JDK to be replaced, otherwise PowerServer Toolkit cannot call JDK properly.

  • The version of the JDK to be copied to the PowerServer Toolkit directory cannot be lower than 1.6.0_24. You can execute the command "java –version" under the bin folder of the JDK to check its version information, as shown below.

    JDK Java version command