android
共 7 篇文章
cocos2d-x获取设备信息
DeviceUtils.h // // DeviceUtils.h // gamemoom // // Created by Song on 14-8-20. // // #ifndef __gamemoom__DeviceUtils__ #define __gamemoom__DeviceUtils__ #include <iostream> using namespace std; const char* getModel(); int getSdkVersion(); const char* getOsVersion(); const char* getPhoneNumber(); #…
Cocos2dx android build shell file
./jni/Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := game_shared LOCAL_MODULE_FILENAME := libgame LOCAL_SRC_FILES := hellocpp/main.cpp define all-cpp-files-under $(patsubst ./%,%, \ $(shell cd $(LOCAL_PATH) ; \ find ../../Classes -name "*.cpp" -and -not -name ".*") \ …
Creating an iOS and Android Cocos2D-x 2.1.1 hybrid project
由于cocos2d-x 2.1.1版本的build规则与之前有较大差别,所以在iOS项目跟android项目代码整合方面花了一些时间。 特别声明:本文创建的是cocos2dx project,非特殊项目,例如Box2D project。如果你需要的是Box2D project,自行参考处理。 参考了以下文章 http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/ http://www.himigame.com/cocos2dx-v2-0/962.html 先将整合步骤整…
2013-05-28 20:48 · android · iOS · Android · cocos2dx
GLES2.0 on Android emulator
cocos2d-x 的HelloCpp sample 一直在eclipse下跑不起来。 AVD中的GPU已经enabled了。 最终,发现要修改Cocos2dxActivity.java 文件(PATH: ../cocos2d-x/cocos2dx/platform/android/java/src/org/cocos2dx/lib) 在init() 方法的 添加this.mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0); 具体原因未知。
2013-05-27 17:19 · android · Eclipse · opengles · cocos2dx
Cocos2dx setup Eclipse environment for Android
Notes for porting cocos2dx games from iOS to Android: - create-android-project.sh - eclipse > new project from existing code - add NDK_ROOT variable in eclipse (build_native.sh need to define NDK_ROOT, otherwise will report "Please define NDK_ROOT") NDK_ROOT "path.to/android-ndk-r8b" - make eclipse…
2013-05-27 16:32 · android · Eclipse · Android · cocos2dx
The import org.cocos2dx.lib cannot be resolved
Step 1: In Eclipse, right-click on your project and select the last option "properties". Step 2: In Project Properties window, select "Java Build Path" in the left pane. Step 3 : Under Java Build Path, select tab "source". It should be selected by default. Step 4: Click on button "Link Source" Step…
2013-05-27 14:31 · android
New Android App Project: R cannot be resolved to a variable
新建的blank android application project 上来就报错:R cannot be resolved to a variable google了几乎所有方法,例如import, fixed Project properties等等,均无解。 最终,在stackoverflow上看到了问题的关键点,Build-Tools没装 启动 Android SDK Manager: ${SDK_PATH}/tools/android (mac版本) 安装Build-Tools后,重启eclipse。搞定!收工!
2013-05-27 11:31 · android · Android · Elipse