2
即使對於示例cocos2d helloworld文件也會出現一些錯誤。無法編譯android cocos2d文件--Android-Studio
Android NDK: android-13 is unsupported. Using minimum supported version android-14.
[armeabi] Compile++ thumb: cocos2dxandroid_static <= ProcessCpuTracker.cpp
/home/user/Documents/cocos2d-x-3.15.1/game/cocos2d/cocos/platform/android/jni/ProcessCpuTracker.cpp: In function 'std::vector<_CpuInfo> readProcStat()':
/home/user/Documents/cocos2d-x-3.15.1/game/cocos2d/cocos/platform/android/jni/ProcessCpuTracker.cpp:69:54: error: 'read' was not declared in this scope
const int len = read(fd, buffer, sizeof(buffer)-1);
^
/home/user/Documents/cocos2d-x-3.15.1/game/cocos2d/cocos/platform/android/jni/ProcessCpuTracker.cpp:70:13: error: 'close' was not declared in this scope
close(fd);
如何解決?
看來,如果你想和科科斯一起,使用開發者正在使用NDK r13 –