Last updated: May 6, 2019
- Install Android Studio 3.3.2 or later.
- Download Android NDK 14.
- Download the project's assets folder.
- Replace cocos2d folder present in the mainapp, bookviewer and seaworld projects with the one present in the downloaded assets folder.
- Replace the Resources folder in the assets with the one present in mainapp project. Ensure that only one locale specific folder is present in the localize folder i.e., keep either en-us or sw-tz folder and the related files.
- Open the application that you are trying to build in Android Studio. Select the build option under Build menu.
- The build process may prompt you to install various dependencies related to the Android SDK and Build Tool. Make sure to install them.
- If the application prompts you to update the Gradle version used in the project, do not update it.
- Install the applications from Android Studio using the Run app option from the Run menu or using the APK generated in app/build/outputs/apk folder.
- If any of the applications throw APK signing error then either comment the signing configuration from the app's gradle file or create your own keystore file following the steps mentioned here.
- KitkitSchoolLogger module is shared among the projects.
- Set the build variant to debug for all project apps except for the mainapp which is described in the fourth FAQ below.
- There is no need to install cocos application separately for these projects.
-
There is a cross mark on the app cofiguration button. How do I fix that?
If there is a cross mark, the default/main activity of the application is not set for the project. Either go to app/build/outputs/apk folder and install the APK which is generated right after the build process or set the start activity in the app configuration settings of the project.
-
How do I enable the Build variant option in the Build menu?
The Build variant option is enabled only when the module-level gradle file is opened.
-
The application throws keystore file not found error. How do I fix this?
A keystore file is used to digitally sign an Android application, hence, it is not provided with the project. You must create your own keystore file using the Android keytool that comes with the Android Studio in order to sign the APK.
-
How do I fix the mainapp application when it gives a runtime error related to the package name com.enuma.xprize?
The runtime error related to the com.enuma.xprize package is caused by an incorrect build variant setting for the application. Refer to the table below for the build variant settings.
App name Build variant KitkitSchool generalDebug-armeabi kitkitlogger release libcocos2dx debug models debug -
How do I fix NDK not found error?
- Unzip the NDK folder.
- Rename the unzipped folder to "ndk-bundle" and place it in the Android SDK root directory.
- Ensure the ndk-bundle folder contains the children files and folders.