Quick Cocos2d-x 3.5 packaged Android APK (compiled cocos2d-x os+ hit apk)

Source: Internet
Author: User

1: Compiling the OS Package (Original tutorial: http://blog.csdn.net/yanghaojian/article/details/46777521)


1. Create a new project, HelloWorld

2. Open Eclipse and import the frameworks\runtime-src\proj under the project. Android Engineering

3. Import the Cocos Library, where you can select the engine library, or the project Engineering Engine library can be. When the project was created, a copy was made. I'm using a library on the same side of the engine,

Mine is: E:\quick-3.5\cocos\platform\android\Java

4. Copy the two folders under the root directory of the project res and SRC to proj.android under asserts

5. Back to eclipse, right-click Project Properties-builders-new, create a new compilation, name Luabuilder, the following 4 options:

respectively: Main, Refresh,environment,build Options

Modify:

Main:

1.Location, choose Browse File System, select Ndk-build.cmd under your NDK directory, here 3.5 engine version needs R10 above, mine is the NDK version is r10d

Path: D:\android\android-ndk-r10d\ndk-build.cmd

2.Working Directory: Choose Browse Workspace and choose your Android project.

Refresh: Make a first tick

Environment:

New one, Name: Ndk_module_path, path: E:\quick-3.5\cocos\quick_libs; E:\quick-3.5\cocos; e:/quick-3.5/external; e:/quick-3.5; E:\quick-3.5\tools\simulator\libsimulator;

Note that my engine root directory is placed under the E-disk, quick-3.5, the students refer to write. If you have previously selected the Cocos Library in your project, you should import the Cocos Library path in your project.

Build opations:

Remember not to change. Default

At last:

650) this.width=650, "src=" http://img.blog.csdn.net/20150706181829328 "style=" Border:none; "/>650" this.width= 650, "src=" http://img.blog.csdn.net/20150706181832648 "style=" Border:none; "/>650" this.width=650; "src=" http:// img.blog.csdn.net/20150706181835361 "style=" Border:none; "/>650" this.width=650; "src=" http://img.blog.csdn.net /20150706181837896 "style=" border:none; "/>

Finally, the new Luabuilder up to the top.

650) this.width=650; "src=" http://img.blog.csdn.net/20150706181840503 "style=" border:none; "/>

6. Modify the JNI under the Mk file, find a line as follows, modified to:

#$ (call import-module,tools/simulator/libsimulator/proj.android), which is preceded by the # sign, comments.

7. Select Project-build all on the menu bar, the process is long because all the library files are compiled.

8. After compiling, you can see: [Armeabi] Install:libcocos2dlua.so = libs/armeabi/libcocos2dlua.so

9. Package your signature. omitted here.

In the virtual machine or mobile phone run, you can see the last: Really ugly oh.

650) this.width=650; "src=" http://img.blog.csdn.net/20150706183327306 "style=" border:none; "/>



2: Pack apk

* You must first configure the packaged environment variables (NDK, SDK, JDK), you can search how to configure

Package apk must file:

1:xxqy.keystore Signature

2:ant.properties signed configuration file

3:local.properties placing the SDK path, NDK path


The last command line executes Ant and can be packaged. The package is placed in the Bin folder by default.


Finished items:


This article is from the "accompany you through the Long Years" blog, please be sure to keep this source http://4774721.blog.51cto.com/4764721/1827542

Quick Cocos2d-x 3.5 packaged Android APK (compiled cocos2d-x os+ hit apk)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.