0:About the script error when using the VC template to create the template, modify file attributes in .. \ cocos2d-x-2.2.2 \ template \ msvc \ CCAppWiz. win32 \ HTML \ 1033: Security-> unlock.
1:Fatal error C1083: Unable to open include file: "cocos2d. h ": no such file or directory missing these header files are because the cocos2d-x is using its own directory at compilation, and if our project is built in the cocos2d-x directory, there will be No such problem, but what I chose is put the project outside, create a folder, and put all the projects in the folder.
The solution to this problem is to modify the js file under the cocos2d-x directory and create an environment variable. Note that there must be a "\" behind the location of the new environment variable.
Specific Practices refer to the http://blog.csdn.net/cxmanzhao/article/details/8671115 this article modify and replace the js file is good to modify the variable to log out or restart it. Or the solution is as follows: Select "project properties --" C/C ++ -- "and set the Directory included in the attachment to" $ (ProjectDir) "to" absolute path. You can observe that $ (ProjectDir) is the project folder path, which is correct if it is in the cocos2d-x directory. So the path should be changed to the absolute path of the cocos2d-x directory.
2:After completing the above steps, re-compile the file and find the error fatal error LNK1104: Unable to open the file "libcocos2d. lib"
This solution
3:After the file is compiled successfully, go to Debug under the directory where the project is located. when the exe file is run in the win32 folder, the system prompts that libcocos2d is missing from the computer. dll and so on. Note that if you are a 32-bit system
Run the Release under the cocos2d-x installation directory. copy the dll file in win32 to windows \ system32 on drive C. If it is missing, copy it to my 64-bit operating system. So I put it in C: \ Windows \ SysWOW64: if you do not work in system32, you can put it in the 64-bit system directory. This completes environment installation and can write programs normally and run the demo.
It seems that you can also add the path of these dll files through the system environment variables (.. \ cocos2d-x-2.2.2 \ Debug. win32) to solve.
4:When the program crashes, the background prompts java. lang. IllegalArgumentException: No configs match configSpec.
This is because the android simulator does not support OpenGL ES 2.0.
Solution: when creating a simulator: Select yes for GPU emulation. You must use a version later than android 4.0. This problem does not occur when you use a real machine.
5:After build_native.sh runs successfully, this problem occurs after the project is imported to eclipse. The prompt Cocos2dxActivity cannot be resolved to a type is displayed.
1. just copy the cocos2dx/platform/android/java/src folder under the root directory of the cocos2d-x engine to the src package of the project.
2. You can also import the cocos2dx/platform/android/java project to generate a jar file and add it to the libs folder of the project.
Both methods will copy the dependency to the apk when it is generated.