Reprinted Please note: http://blog.csdn.net/herm_lib/article/details/8644340
1. Download several necessary software first
[1] jdk-7u17-windows-x64
[2] Android SDK, adt-bundle-windows-x86_64-20130219
I downloaded this file with eclipse.
Android ndk, android-ndk-r8d-windows
[4] cygwin
Install g ++, make, and so on.
2. Set the environment variable ndk_root
Specify ndk_root to the android-ndk-r8d-windows.
3. Modify the create-android-project.bat under the cocos2dx directory
[1] Add:
CD/d % ~ Dp0
[2] modifying paths such as cygwin
4. Run create-android-project.bat as Administrator
Specify the package and project name. A new project is generated under cocos2dx.
5. Start cygwin as an administrator and run proj_name/proj. Android/build_native.sh
An error is reported. For example, JNI/hellocpp/Main. cpp: Permission denied.
I don't know why the entire directory cannot be changed because of modifying the permissions of these files !? I made changes one by one.
If C ++ 11 is used, an error is reported, indicating that STD: mutex, STD: thread cannot be found. In application. mk, add:
App_cppflags: =...-STD = C ++ 11
Ndk_toolchain_version = 4.7 # This must be added ....
I don't know why. I added this on the Mac machine, but the compilation still reported the error. In Windows + cygwin, it was okay... It's too tough.
6. Start eclipse
File-> project...-> Android project from existing code
Export the project just now.
7. Build-> RUN
This step may cause some errors.
Do the following two things:
[1] convertCodeCopy to: helloworld \ proj. Android \ SRC
[2] androidmanifest. XML,
<Application Android: Label = "@ string/app_name" Android: icon = "@ drawable/icon">
<Application Android: Label = "@ string/app_name" Android: icon = "@ drawable/ic_launcher">
After successful, the APK will be generated under proj. Android \ bin.
This production process is absolutely too troublesome. In 2003, Windows CE, developed by Visual Studio, created the maxcompute installation package,
You only need a wizard to create a project. It is much easier to compile a Symbian package as long as the next SDK is used.