android studio BaseGameUtils [英] android studio BaseGameUtils

查看:30
本文介绍了android studio BaseGameUtils的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施 Google Play 游戏服务,我需要在我的项目中将 BaseGameUtils 作为库.按照谷歌教程,我找不到将它包含在我已经在 android studio 中的项目中的方法.在 Android Studio 中手动导入...

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...

如何在已经存在的项目中导入 BaseGameUtils?最佳做法是什么?

How should I import BaseGameUtils in a project that already exists? What is the best practice?

我应该将整个 BaseGameUtils 复制到模块的 libs 文件夹中吗?或者我应该在我的项目文件夹中复制 BaseGameUtils 吗?

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
|--|--|--...

\Project
|--\module
|--|--\libs
|--|--|--android-support-v4.jar
|--|--|--...
|--|--\src
|--|--|--...
|--\libraries
|--|--\BaseGameUtils

除了在 gradle 文件中(在 BaseGameUtils 中),我应该在其他任何地方提到 BaseGameUtils 是一个库吗?

Except in the gradle file (in BaseGameUtils) should I mention anywhere else that BaseGameUtils is a library?

推荐答案

  1. 打开文件>项目结构
  2. 点击左上角的+号
  3. 选择导入 Eclipse ADT 项目"并点击下一步
  4. 在您的计算机上选择 BaseGameUtils 路径,例如/android-basic-samples-master/BasicSamples/libraries/BaseGameUtils",在下一个屏幕中您将看到类似:BaseGameUtils"的模块名称,然后单击确定
  5. 点击下一步,您将能够在您的模块中看到 BaseGameUtils 模块
  6. 在项目结构中选择您的应用程序,转到依赖项,单击 + 号并选择模块依赖项",然后选择BaseGameUtils"
  7. 单击确定",您的 gradle 将被重建,并拥有对 BaseGameUtils 函数/类的所有访问权限.

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

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