打广告用的是cocoide打包,遇到了不少问题,首先要求的ndk r9d,python 2.7.5,我之前没注意看用的还是以前的2.7.3郁闷。其中遇到的主要几个问题是:
1.
The Selected NDK toolchain version was 4.8 !
running: 'D:\android-ndk-r9b\ndk-build -C E:\cocos_project\MoneyMax\proj.android
-j4 NDK_MODULE_PATH=E:\cocos_project\MoneyMax\proj.android\../cocos2d;E:\cocos_
project\MoneyMax\proj.android\../cocos2d/cocos;E:\cocos_project\MoneyMax\proj.an
droid\../cocos2d/external NDK_DEBUG=1'
具体怎样我不是很清楚了,反正就是ndk编译不过。原因是解压的ndk文件中少了目录 build/core 重新解压一次就好。我就不明白了为什么第一次解压没有呢?还有配置系统变量的时候,路径要用正斜杠而不是反斜杠。
2.
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Android NDK: WARNING:J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/cocos//./Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/cocos//platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for static libraries
make.exe: Entering directory `J:/Game2/CocosLuaGame/frameworks/runtime-src/proj.android'
[armeabi] StaticLibrary : liblua.a
[armeabi] StaticLibrary : libnetwork.a
[armeabi] StaticLibrary : libcocosbuilder.a
[armeabi] StaticLibrary : libcocostudio.a
[armeabi] StaticLibrary : libspine.a
[armeabi] StaticLibrary : libui.a
[armeabi] StaticLibrary : libextension.a
[armeabi] StaticLibrary : libcocos2d.a
[armeabi] StaticLibrary : libcocosdenshion.a
[armeabi] StaticLibrary : libBox2d.a
[armeabi] StaticLibrary : libchipmunk.a
[armeabi] StaticLibrary : libcocos2dandroid.a
[armeabi] StaticLibrary : libcpufeatures.a
[armeabi] SharedLibrary : libcocos2dlua.so
[armeabi] Install : libcocos2dlua.so => libs/armeabi/libcocos2dlua.so
make.exe: Leaving directory `J:/Game2/CocosLuaGame/frameworks/runtime-src/proj.android'
Updated project.properties
Updated local.properties
Updated file J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\proguard-project.txt
Updated file J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\..\..\cocos2d-x\cocos\platform\android\java\proguard-project.txt
系统找不到指定的路径。
Running command: compile
Building mode: debug
building native
NDK build mode: debug
The Selected NDK toolchain version was 4.8 !
running: 'D:\android-ndk-r9d-windows-x86_64\android-ndk-r9d\ndk-build -C J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android -j1 NDK_MODULE_PATH=J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x;J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/cocos/;J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/external;J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/cocos/scripting NDK_DEBUG=1'
building apk
running: '"D:\adt-bundle-windows-x86_64-20131030\sdk\tools\android" update project -t android-19 -p J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android'
running: '"D:\adt-bundle-windows-x86_64-20131030\sdk\tools\android" update lib-project -p J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\../../cocos2d-x/cocos/platform/android/java -t android-19'
running: '"D:\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin\bin\ant" clean debug -f J:\Game2\CocosLuaGame\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="D:\adt-bundle-windows-x86_64-20131030\sdk"'
Error running command,return code: 1
原因是ant_home不对,具体可参考http://stackoverflow.com/questions/21951096/windows-7-ant-home-is-set-incorrectly-or-ant-could-not-be-located-please-set-a
公司项目遇到了这样一个问题:滚动层无法正常显示,绿色背景:具体解决可参考这里:http://www.cocoachina.com/bbs/read.PHP?tid=199760
原文链接:https://www.f2er.com/cocos2dx/347147.html