Suppose that the blog picture is not clear. Ability CTRL + MOUSE to scroll zoom page scale
What is Cocos2d-java?
http://blog.csdn.net/touchsnow/article/details/38704733
Configure the installation
Two ways, one using the official development tool CocosEditor2.0, and a Java development tool that uses eclipse. Priority recommendation Cocoseditor, built-in COCOS2D-JAVA development kit and JDK, including interface design, physical system, picture packaging, font design and other powerful features. Using eclipse only supports code authoring and debugging simulations. Other needs third-party tools
A CocosEditor2.0 tool
- Download (go to official website to download cocoseditor for Java)
Select tool –cocoseditor for Java (Cocos2d-java)
Cocoseditor Official website: http://cocoseditor.com/download.htm
- Configure Windows Development platform under Hello
Note: The file path in the step do not appear space and other special symbols;
1 Download Tool Zip package, unpack, open the Bin folder, find CocosEditor.exe, can send the icon to the desktop shortcut, easy to start later;
2 Double-click Cocoseditor, start the tool;
3 after startup, come to the project interface and click Create New project;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
4 Select Cocosjava, click Next;
5 Specify the project folder location
6 name Hello, click Finish.
7 OK to create;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
8 Enter the development interface;
9 Click on the button in the image, configure Cocosjavaproject;
10 Click the green + sign. Create a new Cocosjavaproject;
11 name Hello, select Main class, and select Hello module. Ok OK.
12 Green Triangle, executive javaproject;
13 Simulator execution success;
14 View the configuration. Discover that Java Virtual machines and working folders are configured on their own initiative.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
- Porting to the Android platform Hello-android
1 File-new Project creates a new item.
2 Select Cocosjava-android. Click Next;
3 Put the item into the same folder as the Hello Javaproject just now, name Hello-android.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
4 Open the Project Structure dialog box.
5 Open the project structure. New add to Android SDK;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
6 Click Newbutton, select Android SDK;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
7 Choose your Android SDK location.
8 Select the corresponding Android SDK;
9 for example with. The Android API appears.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
10 now go to import just the Hello module. Click on the green + sign, click Import Module;
11 Select Hello.iml file, import helloproject module into Hello-androidproject, click OKButton;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
12 The following structure is present, which is now required to add a reference Hello module to hello-android
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
13 Click + Number, select Module Dependency;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
14 Select the Hello module, OK;
15 Finally the structure becomes, pay attention to the comparison;
15 Now open hello-android, click on Android, change the asserts directory folder to Helloproject Target/asserts;
16 becomes for example the following structure, click OK OK;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
In the project structure configuration, wait for some time.
18 now go to configure the number of androidproject;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
19 Click + Sign. Choose Android Application;
20 named Hello-android, select Hello-android module, select the real machine debugging, determine;
21 Appear green Triangle control button, connect your Android Real machine successfully, click Green triangle to execute;
Android executed successfully;
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdg91y2hzbm93/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
- Configure the Mac development platform under Hello
Please wait patiently for the announcement.
- Porting to the iOS platform Hello-ios
Not announced. Please wait patiently .....
Two cdk+eclipse environment configuration:
About to write .....
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Cocos2d-java Installing and configuring a cross-platform game engine and related development tools