无法链接使用Eclipse进行Android的OSX上到cocos2dx [英] Can't link to cocos2dx using eclipse for android on OSX

查看:133
本文介绍了无法链接使用Eclipse进行Android的OSX上到cocos2dx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从来没有花了这么多时间在初始设置之前,开发环境,这是获得一种荒谬的。

I've never spent so much time on initial setup for a development environment before, this is getting kind of ridiculous.

我试图运行演示code附带cocos2dx。 我使用的:

I'm trying to run the demo code that comes with cocos2dx. I'm using:

  • 在随附ADK月食的味道。
  • 的cocos2d-2.1beta3-X-2.1.0
  • NDK-R8C

香港专业教育学院尝试使用create-android-project.sh我有同样的问题,但对于这个问题,我会引用HELLO.CPP示例应用程序建立一个应用程序的模板。

Ive tried building an app template using create-android-project.sh which I had the same problems with but for this question I'll reference the hello.cpp sample app.

我运行build_native.sh脚本,然后它在Eclipse导入。 接下来是所有不同的教程我已经试过有所不同。有人说要转换为C ++项目有人说你已经可以运行为Android项目在这一点上了。

I run the build_native.sh script and then import it in eclipse. Next is where all the different tutorials I've tried vary. Some say to 'convert to a c++ project' some say you can already 'run as android project' at this point already.

对于我来说,似乎是Android的Java项目无法链接到cocos2dx项目。

For me it seem like the android java project can't link to the cocos2dx project.

我得到:

The import org.cocos2dx.lib cannot be resolved

import org.cocos2dx.lib.Cocos2dxActivity

没有教程着实让没有提到必须建立cocos2dx库,除了一个是说你现在必须导入科科斯库,项目到Eclipse工作区。因此,香港专业教育学院这样做了,并建立了他们,但也有在其中一些错误建成后。

No tutorial really made any mention of having to build the cocos2dx libraries except for one that said you now have to import the cocos libraries as projects in to the eclipse workspace. So Ive done that and built them but there are some errors in them after building.

我也试着将文件夹路径,在这对我来说是/cocos2d-2.1beta3-x-2.1.0/cocos2dx/platform/android/java/src/org/cocos2dx/lib项目链接但是这并没有帮助。

I've also tried adding the folder path to link to in the project which for me is at /cocos2d-2.1beta3-x-2.1.0/cocos2dx/platform/android/java/src/org/cocos2dx/lib but that didn't help.

任何想法,为什么我不能建立/运行以下是对cocos2dx网站到T?

Any idea why I can't build/run the examples that come with cocos2dx even when following the build instructions that are on the cocos2dx website to the T?

推荐答案

现在我这样做的OSX,以及和这个固定为我:

I'm doing this now on OSX as well and this fixed it for me:

运行的Adroid脚本create-android-project.sh然后 导入新的项目到Eclipse

run the adroid script create-android-project.sh then import that new project into Eclipse

  1. 在新的Eclipse项目右键单击src文件夹>左键单击导入
  2. 在导入窗口中选择的Andr​​oid>现有Android的code进入工作区>下一页>>
  3. 在浏览到/ cocos2dx /平台/安卓/ Java的'('/ cocos2dx /'应该是一个级别的新项目的目录以上)
  4. 单击Finish(完成)。如果错误仍然存​​在尝试项目>清除

这篇关于无法链接使用Eclipse进行Android的OSX上到cocos2dx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆