如何添加"空模块" Android Studio中? [英] how to add "Empty Module" in Android Studio?

查看:251
本文介绍了如何添加"空模块" Android Studio中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这里使用教程AndEngine添加到我的Andr​​oid项目:的https://docs.google.com/document/d/1fcSowvlKMqfTjM9r1mMP48KEhWbkJZGBDR5duFg4QYc/edit

I am trying to add AndEngine to my Android Project using the tutorial here: https://docs.google.com/document/d/1fcSowvlKMqfTjM9r1mMP48KEhWbkJZGBDR5duFg4QYc/edit

我停留在第6步在本教程中,无法看到在我的Andr​​oid工作室Envt空模块选项。 (版本0.4.0)

I am stuck at Step #6 in the tutorial, unable to see the "Empty Module" option in my Android Studio Envt. (Version 0.4.0)

推荐答案

您可以简单地将AndEngine模块复制你的项目目录内,然后配置你的build.gradle和settings.gradle把它列入到像

You can simply copy the AndEngine module inside your project directory and then configure your build.gradle and settings.gradle to include it in to dependencies like

 ----YOUR_PROJECT
   ---AndEngine
     --res
     --src
     -- .....
     -- build.gradle
   ---YOUR_MODULE
     --res
     --src
     --build.gradle (no : A)
 ----settings.gradle

的build.gradle(编号A)文件

build.gradle (No. A) file

  dependencies {
       compile project(':AndEngine')
   }

settings.gradle:

settings.gradle :

   include ':YOUR_MODULE'
   include ':AndEngine'

观察到AndEngine是不会移动到尚未摇篮,在这种情况下使用下载Ant或Eclipse中创建罐子。

As Observed AndEngine is not moved to gradle yet, In that case download create jar using ant or eclipse.

您的项目内的创建libs文件夹

The create a libs folder inside your Project

  ----YOUR_PROJECT

   ---YOUR_MODULE
     --libs
       -AndEngine.jar
     --res
     --src
     --build.gradle (no : A)
 ----settings.gradle

现在转到文件>项目结构>模块>依赖> +绿色按钮>文件相关性>选择AndEngine.jar和preSS确定

Now go to File > Project Structure > Modules > Dependencies > + green button > File Dependency > select AndEngine.jar and press OK

您将看到这些线路将在里面的依赖文件的build.gradle自动添加,您可以添加此手动以及没有任何区别。

You will see these lines will be automatically added in your build.gradle file inside dependencies, you can add this manually as well no difference.

      compile files('libs/AndEngine.jar')

这篇关于如何添加"空模块" Android Studio中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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