机器人工作室BaseGameUtils [英] android studio BaseGameUtils
问题描述
我想实现谷歌Play游戏服务,我需要有BaseGameUtils在我的项目库。继谷歌教程我无法找到一个办法,包括这在我已经在Android Studio中的一个项目。 <一href=\"https://github.com/playgameservices/android-samples#importing-manually-in-android-studio\">Importing手动Android Studio中......
我应该如何导入BaseGameUtils在一个已经存在的项目呢?什么是最好的做法是什么?
我应该复制整个BaseGameUtils libs文件夹中我的模块中?或者我应该复制BaseGameUtils在我的项目文件夹?
\\项目
| - \\模块
| - | - \\库
| - | - | --android支持,v4.jar
| - | - | --...
| - | - | - \\ BaseGameUtils
| - | - | - | --...
| - | - \\ SRC
| - | - | --...
或
\\项目
| - \\模块
| - | - \\库
| - | - | --android支持,v4.jar
| - | - | --...
| - | - \\ SRC
| - | - | --...
| - \\库
| - | - \\ BaseGameUtils
除了在gradle这个文件(在BaseGameUtils)我应该提到其他地方的BaseGameUtils是一个库?
- 开启文件>项目结构
- 在左上角点击+号
- 选择导入Eclipse ADT项目,然后单击下一步
- 选择BaseGameUtils路径中的下一个屏幕,你会看到模块的名称类似:BaseGameUtils,然后点击确定
- 单击旁边你就可以看到BaseGameUtils模块中的模块
- 选择在项目结构您的应用程序,去相关性,点击+号并选择模块依赖,然后选择BaseGameUtils
- 单击确定和你的gradle这个将与所有访问BaseGameUtils功能/班被重建。
你的电脑像/ Android的基本采样主/ BasicSamples /库/ BaseGameUtils和
I'm trying to implement Google Play Game Services, and I need to have BaseGameUtils as a library in my project. Following google tutorials I could not find a way to include this in a project that I already have in android studio. Importing manually in Android Studio...
How should I import BaseGameUtils in a project that already exists? What is the best practice?
Should I copy the whole BaseGameUtils in the libs folder in my module? Or should I copy BaseGameUtils in my project folder?
\Project
|--\module
|--|--\libs
|--|--|--android-support-v4.jar
|--|--|--...
|--|--|--\BaseGameUtils
|--|--|--|--...
|--|--\src
|--|--|--...
or
\Project
|--\module
|--|--\libs
|--|--|--android-support-v4.jar
|--|--|--...
|--|--\src
|--|--|--...
|--\libraries
|--|--\BaseGameUtils
Except in the gradle file (in BaseGameUtils) should I mention anywhere else that BaseGameUtils is a library?
- Open File > Project Structure
- Click on the + sign in the top left corner
- Select "Import Eclipse ADT Project" and click next
- Select BaseGameUtils path on your computer like "/android-basic-samples-master/BasicSamples/libraries/BaseGameUtils" and in the next screen you will see module name something like ":BaseGameUtils" then click ok
- Click next you would be able to see BaseGameUtils module in your modules
- Select your app in the project structure, go to dependencies, click on + sign and select "module dependency" and then select "BaseGameUtils"
- Click Ok and your gradle will be rebuild with all the access to BaseGameUtils functions/classes.
这篇关于机器人工作室BaseGameUtils的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!