It's been a long time since I've been out of the bag on Android, and the previous project was not considered to be an Android version because of some issues, so it was a toss-up when it comes to Android packaging. This period of time left, free time there are many, so I can toss something. Think of a small Russian block project, did not install on their own computer, then think about whether you have to configure the environment on their own computer and so on. Because a long time did not toss on their own computer, so that a lot of things are a little strange, and then the engine version of what is also a bit different, the environment configuration needs to be modified. Then there are a lot of problems:
1, about Partform began to run directly, is the xxx partform problem, this is the beginning of the encounter, then did not have time to detailed record down. I remember this question my friend also met, and not one or two times the problem, I think it may be the system environment is not configured well. Online data found that the COCOS2DX v3.2 version of the NDK version needs to be r9d, and then my computer is loaded with r8e, so first this is the problem. Google's official website seems to be over the wall, and can not be directly downloaded to the old version of the NDK, the information found on the Internet can actually be downloaded indirectly: Windows version download:
32-bit: Http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip
64-bit: Http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip
Linux version: 32-bit: http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz264 bit: http://dl.google.com/android /ndk/android-ndk-r9d-linux-x86_64.tar.bz2
Mac Version: 32-bit: http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86.tar.bz264 bit: Http://dl.google.com/android/ ndk/android-ndk-r9d-darwin-x86_64.tar.bz2
Download different version, just want to change the link in such as r9d to the required version number, and then as if the new version of the suffix format changed, it may involve the download package format modification, that is, the link is the most recent package format modified, this can be referred to the NDK official website. Download the correct NDK version, then modify the environment configuration, then there is no problem, then the rest of the issue is shining!
2, about "cocosbuilder/cocosbuilder.h" File not found
This is similar to the situation above. This need involves modifying the proj.android/jni/android.mk file. The syntax of the android.mk file I am not very clear, just know that this must be changed. Simple syntax by looking at the information on the Internet you know:
- The comment is preceded by a "#" sign in the statement;
- Between the code can be separated by a space or TAB key;
- A newline is followed by a "\" sign after the statement;
- The assignment is ": =" this combination symbol;
- Append is "+ =" this combination symbol;
- The value of the reference variable "$".
": =" differs from "=":
- ": =" means that the value assigned to the right of it is a variable that can only be defined before using this statement, but not the one defined after the statement;
- "=" means that when the right assignment is a variable, the definition of the variable is possible before or after this statement.
Then we can open the new project, which is the Android.mk file:
As you can see, some are preceded by a # symbol, which is the statement that is commented out. From these commented out statements can see the import Cocosbuilder, Cocostudio and other libraries are commented out, we want to use the words need to uncomment, in addition to the import module, you can see the Import extensions extension, The Cocosbuilder Editor extension has been commented out. By removing these annotations, you will be able to solve the problem.
3, about "extensions/cocos-ext.h" file not found this is similar to the problem 2, import library support is commented out, cancel the comment is OK.
By the end of the deal, I have happily packaged the items on the Android phone.
Cocos2d-x Development---about Error Records encountered with Android packaging