加载中…
个人资料
MolioAPP
MolioAPP
  • 博客等级:
  • 博客积分:0
  • 博客访问:1,050
  • 关注人气:1
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
访客
加载中…
好友
加载中…
评论
加载中…
留言
加载中…
分类
博文
Hi,

Here are some notes that when I upgraded my game to .12 version what I learned about with new JNI architecture that cocos2d-x used.

Question 1:In the jni\helloworld\main.cpp, you can find there is already JNI_on1oad() there. Yes, that means you can't implement your JNI_on1oad.

Solution:You can call RegisterNatives() at JNI_on1oad() which at main.cpp instead to register your jni class.

Something like the code below : 

    jclass clazz;
    JNIEnv *env;
    vm->GetEnv((void**) &env, JNI_VERSION_1_6);
    const char *classPathName = 'com/zhihmeng/ChickenEggsX/ChickenEggsX';
    JNINativeMethod methods[] = {
        {'init',       '(Ljava/lang/Object;)V',
     
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
Cocos2d is a great game framework on iOS, and I do implement a game using that on iOS.
But after a while, my friends ask me, where is the android version of your game ?
Yeah, I told to myself, why not get a android version ?

I start to try to find a soultion for porting cocos2d game to android, and I found cocos2d-x - a c++ based cocos2d engine porting, supports multiple platforms including iOS/Android/Win32.
Well, it seems will be my perfect way to port iOS game to Android.
But after I start and almost finish the game logic part, I found sudden
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 

亲爱的朋友:

    欢迎您在新浪博客安家,您的博客地址是:http://blog.sina.com.cn/u/2507572654

    您可以用文字、图片、视频记录和展示最真实的自我,与网友交流,与线上好友聊天,还能通过手机发表博文和上传图片,随时随地记录心情和身边趣闻。

    我们为您提供了丰富的炫酷模板来装点您在网上的家园,强大的音乐播放功能更能陪伴您的网络生活。准备好了吗?现在就开始精彩的博客之旅!

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
  

新浪BLOG意见反馈留言板 不良信息反馈 电话:4006900000 提示音后按1键(按当地市话标准计费) 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

新浪公司 版权所有