Last updated: May 6, 2019
The steps for building the Chimple application on a Windows 7 or newer are listed below. To compile and install on macOS X (Mavericks or newer) or Linux, similar steps can be followed. Please do not create any directories with spaces in them.[Creating directories names with spaces may cause problems on Linux installations.]
-
Install the latest version of Android Studio. These steps were created using Android Studio 3.4 for Windows 64-bit.
- Open Android Studio->Tools->SDK Manager
- In the SDK Platforms tab, choose Android 4.4 (KitKat)
- In the SDK Tools tab, choose the latest Android SDK Platform-Tools and Android SDK Tools. Also, choose Cmake version as 3.6.4111459
- Note the Android SDK Location at the top of the window
-
Install the Java Development Kit. These steps were created usign Java SE Development Kit 3.4 8u211 for Windows 64-bit.
- Open Control Panel->System and Security->System->Advanced System Settings->Environment Variables and set a new variable JAVA_HOME to the directory where JDK is installed. Provide the JDK directory, and not the JRE directory.
-
Install Python 2. Do not install Python 3. These steps were created usign Python 2.7.16 for Windows 64-bit.
-
Download Ant 1.9.14 and unzip it to C:\ant.
-
Download NDK R12b and unzip it to C:\ndk.
-
Download Cocos2d-x 3.14.1 and unzip it to C:\cocos.
-
Download Android SDK tools 25.2.5 and unzip it to C:\tools.
-
Install cocos command line tool.
cd C:\cocos
setup.py
It will prompt the following variables:
- ANDROID_SDK_ROOT: Enter the directory from Step 1.4 above
- NDK_ROOT: C:\ndk\android-ndk-r12b
- ANT_ROOT: C:\ant\apache-ant-x.xx.x\bin
Bali is an application which teaches literacy and also controls the progress of the child. This application must be installed first before installing any other applications.
- Open Android Studio.
- File->Open GLEXP-Team-Chimple-goa/bali
- Make sure an Android device is connected with USB debug permissions set.
- Run->Run app
Goa is an application which has many games for a child to play while improving literacy.
- Make sure an Android device is connected with USB debug permissions set.
- Overwrite the directory tools in ANDROID_SDK_ROOT with C:\tools
cd goa
cocos run -p android
By default, the Kiosk mode is enabled. So all games are open. To disable Kiosk mode, set the KIOSK variable in
goa/Classes/menu/ScrollableGameMapScene.cpp
to false
static const bool KIOSK = false;
The custom Android Launcher screen (part of Bali) will cover the screen every minute if enough coins are not there. This is useful to encourage children to learn and earn coins which they can use to buy camera time or other game time. By default, (as part of Kiosk mode) this is disabled. To enable this functionality, in Bali/app/src/main/java/org/chimple/bali/launcher/LauncherScreen.java
set the POPUP variable to true
public static final boolean POPUP = true;
In goa/Classes/lang/LangUtil.cpp
:
_instance = new EnglishUtil();
// _instance = new SwahiliUtil();
In goa/.cocos-project.json
:
{
"engine_version": "cocos2d-x-3.14.1",
"project_type": "cpp",
"custom_step_script": "./scripts/custom_script.py",
"chimple_res": "HDR",
"chimple_lang": "eng"
}
In Bali/app/src/main/java/org/chimple/bali/db/AppDatabase.java
:
inputStream = assetManager.open("eng/database.csv");
In goa/Classes/lang/LangUtil.cpp
:
// _instance = new EnglishUtil();
_instance = new SwahiliUtil();
In goa/.cocos-project.json
:
{
"engine_version": "cocos2d-x-3.14.1",
"project_type": "cpp",
"custom_step_script": "./scripts/custom_script.py",
"chimple_res": "HDR",
"chimple_lang": "swa"
}
In Bali/app/src/main/java/org/chimple/bali/db/AppDatabase.java
:
inputStream = assetManager.open("swa/database.csv");
-
How can I resolve the "Not a git repository" error encountered after executing
git packages get
command?To resolve the "Not a git repository" error, delete C:\Users\USERNAME\AppData\Roaming\Pub\Cache\git\cache folder and rerun the
git packages get
command. -
How can I resolve the plugin import dependency error?
- To resolve the plugin import dependency error, create a lib folder in parent directory of the concerned project repository.
- Copy the flutter.jar file from the FLUTTER_SDK_ROOT_DIR\bin\cache\artifacts\engine\android-arm folder into lib folder.
- From the Android Studio, right click the newly added jar file and then select the "Add as library" option.
-
How can I resolve an error encountered after running the "setup.py" script while installing cocos?
To resolve an error encountered after running the “setup.py” script while installing cocos, check to see whether you have Python 3 installed. If you do have Python 3 installed, uninstall it and try running setup.py again.