Package and Runtime Environment Settings

To activate the package function in Cocos Studio, you need to do the following,

Environment and package settings

Windows

Note You need to set installation paths for JDK/ NDK/ SDK/ Framework and set environment variables in Windows properly. Any mistake will lead to a failure.

1 JDK

  image

  image

2 NDK

  image

3 SDK

4 Framework

5 Package Settings

Create a cocos project, and at the same time select a Framework version. Click Edit at the Toolbar -> Preferences -> Platform.

Note Please make sure the following directory must be correct, otherwise there will be errors during the process of packaging.

  image

6 Check

Click Project at the toolbar -> Publish and Package. When finish packaging, click Output panel at the bottom of Cocos Studio. The message "project packaged" will appear at the Output panel, which indicates the environment variables are set right. Otherwise, you need to check the settings and try again.

image

7 Possible errors and analysis

Mac

Installation of various tools on Mac is relatively simple, users do not need to modify environment variables.

Note Apple developer certificate ( .p12) and identities ( .cer) are necessary.

1

  image

  image

2

  image

Package

After configuring the environment, you need to specify Package and Publish settings.

Windows

1 C++ package

If you need to publish a C++ project to csb format, and then package it to an APK file. Do the following:

  image

  image

  image

  image

  Apk package is located in:

  image

  It is a relative path in project directory.

2 The package process of Lua and JavaScript projects is similar to that of C++ projects.

Mac

Android Package: same as on Windows.

iOS Package, do the following:

  image

  image

Run Project

Run project settings are similar to package settings. "Run" function supports pushing and previewing projects directly when an Android device is connected to PC or Mac.