Cocos2d-x 3.2 packaging error Summary

Source: Internet
Author: User

Cocos2d-x 3.2 packaging error Summary

1. During packaging, the environment must be properly configured; otherwise, various errors may occur. If the environment is configured, but the file path is changed later,

The system will prompt that the path cannot be found. Therefore, after the environment is configured, files such as adt, ndk, ant, and jdk cannot be moved at will.

2. In the cocos2d-x3.2 version, replace the previous Code in Application. mk under the jni directory with: APP_STL: = gnustl_static
APP_CPPFLAGS: =-frtti-DCC_ENABLE_CHIPMUNK_INTEGRATION = 1-DCOCOS2D_DEBUG = 1-std = c ++ 11-fsigned-char.
I don't know why I want to replace it like this. I just want to replace it. I don't know if I want to replace it with another version. Otherwise, the package won't succeed.
3. In the jui directory, modify android. mk:
LOCAL_SRC_FILES: = hellocpp/main. cpp \
.../../Classes/AppDelegate. cpp \
../Classes/Bullet. cpp \
../Classes/Cannon. cpp \
../Classes/Fish. cpp \
Add your own class. Do not write an error in the name. Otherwise, the package may fail. Then, set LOCAL_WHOLE_STATIC_LIBRARIES + = cocostudio_static and $ (call import-module, editor-support/cocostudio)
The first # is removed in the last three lines; otherwise, the compilation will not work. Sometimes we need to remove the # Before $ (call import-module, extensions) and LOCAL_WHOLE_STATIC_LIBRARIES + = cocos_extension_static. In the last line, otherwise, an error is reported.




4. the operation on the mobile phone is stopped:
During the packaging process, the operation may be stopped. on the mobile phone, the following situations may occur:
(1) The created c ++ class is not in the classes directory. When opening it in the project, we may see it in this directory, but in the file directory, this c ++ class is not in the classes directory. It may be in other files. If it is in Mac, it should be in pro. in the ios_mac directory, if it is in windows, it may be in pro. android or proj. win32 Directory. In this case, when you open the project, you do not pay attention to saving the path when creating the class. Second, you may only add the current classes when adding the class, but it does not exist in the folder classes directory.
(2) When adding resources to a Chinese source, it may not be added to other directories. It may also be placed in the classes directory. In this case, no error is reported during running.
5. FLASHBACK: A flashback problem occurs when a resource is not copied to pro. in the android folder, or the name is not changed to assets, and it can only be found by this name. Nothing else can be found, so it is easy to write it into asset. If the resource copy is missing or incomplete, all kinds of errors will occur, so pay special attention to this.
6. The display on the mobile phone is incomplete and the screen is not filled. This is the screen adaptation problem. You need to add glview-> setDesignResolutionSize (1136,640, ResolutionPolicy: EXACT_FIT) to the source code );
7. The problem cannot be run in eclipse. android library projects cannot be launched error message. Solution: Right-click the running project and choose Properties from android to remove the check mark before is library, return to your project, right-click the first Android Application in Run.

8. stop error: if the code in application. mk is not modified, the following error occurs,

 

 

Okay, this is my personal summary. I hope it will help you!

 

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.