机器人工作室BaseGameUtils [英] android studio BaseGameUtils

查看:286
本文介绍了机器人工作室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是一个库?


解决方案

  1. 开启文件>项目结构

  2. 在左上角点击+号

  3. 选择导入Eclipse ADT项目,然后单击下一步

  4. 你的电脑像/ Android的基本采样主/ BasicSamples /库/ BaseGameUtils和
  5. 选择BaseGameUtils路径中的下一个屏幕,你会看到模​​块的名称类似:BaseGameUtils,然后点击确定

  6. 单击旁边你就可以看到BaseGameUtils模块中的模块

  7. 选择在项目结构您的应用程序,去相关性,点击+号并选择模块依赖,然后选择BaseGameUtils

  8. 单击确定和你的gradle这个将与所有访问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?

解决方案

  1. Open File > Project Structure
  2. Click on the + sign in the top left corner
  3. Select "Import Eclipse ADT Project" and click next
  4. 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
  5. Click next you would be able to see BaseGameUtils module in your modules
  6. Select your app in the project structure, go to dependencies, click on + sign and select "module dependency" and then select "BaseGameUtils"
  7. Click Ok and your gradle will be rebuild with all the access to BaseGameUtils functions/classes.

这篇关于机器人工作室BaseGameUtils的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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