【cocos2d】cocos编译 android 平台

时间:2023-02-07 21:18:29


cocos编译 android 平台 


macdeMacBook-Pro:projects mac$ cd ./HelloWorld/

macdeMacBook-Pro:HelloWorld mac$ cocos compile -p android --ap android-25

编译模式:debug

使用 Eclipse 工程:/Users/mac/Desktop/cc++/projects/HelloWorld/proj.android

正在执行:'/Users/mac/Library/Android/sdk/tools/android update project -t android-25 -p /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android'


Updated project.properties

Updated local.properties

Updated file /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android/proguard-project.txt

正在执行:'/Users/mac/Library/Android/sdk/tools/android update lib-project -p /Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos/platform/android/java -t android-25'


Updated project.properties

Updated local.properties

Updated file /Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos/platform/android/java/proguard-project.txt

正在执行 ndk-build...

NDK 编译模式:debug

正在执行:'/ios/cocos2d_projects/android-ndk-r9d-windows-x86_64/android-ndk-r9d/ndk-build -C /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android -j2 NDK_MODULE_PATH=/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d:/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos:/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'


/bin/sh: /ios/cocos2d_projects/android-ndk-r9d-windows-x86_64/android-ndk-r9d/ndk-build: No such file or directory

执行命令出错,返回值:127。

macdeMacBook-Pro:HelloWorld mac$ open ~/.bash-pro

The file /Users/mac/.bash-pro does not exist.

macdeMacBook-Pro:HelloWorld mac$ open ~/.bash-profile

The file /Users/mac/.bash-profile does not exist.

macdeMacBook-Pro:HelloWorld mac$ open ~/.bash_profile

macdeMacBook-Pro:HelloWorld mac$ open ~/.bash_profile

macdeMacBook-Pro:HelloWorld mac$ source ~/.bash_profile

macdeMacBook-Pro:HelloWorld mac$ cocos compile -p android --ap android-25

编译模式:debug

使用 Eclipse 工程:/Users/mac/Desktop/cc++/projects/HelloWorld/proj.android

正在执行:'/Users/mac/Library/Android/sdk/tools/android update project -t android-25 -p /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android'


Updated project.properties

Updated local.properties

Updated file /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android/proguard-project.txt

正在执行:'/Users/mac/Library/Android/sdk/tools/android update lib-project -p /Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos/platform/android/java -t android-25'


Updated project.properties

Updated local.properties

Updated file /Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos/platform/android/java/proguard-project.txt

正在执行 ndk-build...

NDK 编译模式:debug

正在执行:'/Users/mac/Library/Android/sdk/ndk-bundle/ndk-build -C /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android -j2 NDK_MODULE_PATH=/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d:/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/cocos:/Users/mac/Desktop/cc++/projects/HelloWorld/cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'


Android NDK: WARNING: APP_PLATFORM android-24 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    

make: Entering directory `/Users/mac/Desktop/cc++/projects/HelloWorld/proj.android'

[armeabi] StaticLibrary  : libcocos2d.a

[armeabi] Compile++ arm  : cocostudio_static <= WidgetReader.cpp

[armeabi] Compile++ arm  : cocostudio_static <= FlatBuffersSerialize.cpp

。。。。。。。。。。

[armeabi] StaticLibrary  : libcpufeatures.a

[armeabi] SharedLibrary  : libMyGame.so

[armeabi] Install        : libMyGame.so => libs/armeabi/libMyGame.so

make: Leaving directory `/Users/mac/Desktop/cc++/projects/HelloWorld/proj.android'

正在生成 apk 文件...

正在执行:'/ios/cocos2d_projects/apache-ant-1.9.6/bin/ant clean debug -f /Users/mac/Desktop/cc++/projects/HelloWorld/proj.android/build.xml -Dsdk.dir=/Users/mac/Library/Android/sdk'