在Android项目利用其他项目 [英] Using other projects in Android project

查看:146
本文介绍了在Android项目利用其他项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这个乱搞,不能找出正确的方式来设置的项目。

I'm messing around with this book and can't figure out the proper way to set up the projects.

他们告诉你做3个项目我将其命名:

They tell you to make 3 projects which I've named:


  • AndroidFrameWork2D

  • AndroidFrameWork2DImplementation

  • snakeGame2

要获得蛇游戏工作我刚刚从另外两个项目复制的包,并将其粘贴到snakeGame2项目。什么是包括这些成snakeGame2让我没有多个副本所有的地方和可以重复使用的项目不同的游戏的正确方法?

To get the snake game to work I've just copied the packages from the other two projects and pasted them into the snakeGame2 project. What's the proper way to include these into snakeGame2 so that I don't have multiple copies all over the place and can reuse the projects for a different game?

下面的图片显示试图出口Java源文件和资源,然后加罐子snakeGame2的构建路径后的树。对于出口,我只选择了源文件夹。

The pic below shows the tree after trying to export the java source files and resources and then adding the jar to the build path of snakeGame2. For the exports, I only selected the source folder.

编辑:
使用dumpstate的答案,我在logcat中得到这样的:

edit: using dumpstate's answer I get this in the logcat:

另一个编辑:
dumpstate的回答,但工作时相比,我刚才复制的包到项目,以它的慢得令人难以置信。这是它们包括在此方式的副产物

another edit: dumpstate's answer worked but it's incredibly slow compared to when I just copied the packages into the project. Is this a byproduct of including them in this manner?

推荐答案

我结束了链接从其他项目的源文件夹下面这个<一个href=\"http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.jdt.doc.user/gettingStarted/qs-WorkingWithExistingLayout4.htm\"相对=nofollow>页面

I ended up linking the source folders from the other projects following this page

这个方法没有做图书馆和罐子时,我观察到的缓慢起伏。

This method didn't have the slow downs I observed when doing libraries and jars.

这篇关于在Android项目利用其他项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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