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

When you use the Appeon 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 Appeon developer 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 Appeon developer directory is working.

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

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

Figure 25. JDK Java command

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 Appeon Developer or copy a valid JDK into the Appeon Developer directory such as "C:\Program Files\Appeon\Developer2016\Java\Jdk1.6.0_24". If you choose to copy a JDK to the Appeon Developer directory, please pay attention to the following two notes:

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

  • The version of the JDK to be copied to the Appeon Developer 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.

    Figure 26. JDK Java version command

    JDK Java version command