在机器人工作室1.0库项目 [英] Library Project in Android Studio 1.0

查看:129
本文介绍了在机器人工作室1.0库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装的Andr​​oid工作室1.0 RC 4,不知道我怎么可以创建一个Android库项目。在<共享解决方案href="http://stackoverflow.com/questions/16601299/how-to-create-a-library-project-in-android-studio-and-an-application-project-tha">this帖子不再工作了。

更新:我不知道这是否足以建立一个库项目,但是这是我做过的步骤:

  1. 创建一个正常的Andr​​oid项目没有活动
  2. 修改应用插件:com.android.application应用插件:com.android.library build.gradle
  3. 删除线的applicationID... build.gradle
解决方案

因此​​,以这个文件有没有这样的事情就像'的的项目或应用程序的项目。有Android项目,其中包含的的模块的,而这些都可以的应用程序的模块的的模块的测试的模块等。
我建议你​​开始与包括一个库模块项目。如果以后你会发现,你需要添加一些测试,你会增加测试模块项目。这同样适用于示例应用程序,你终会(也许)添加到库中。
但是,如果由于某种原因要创建的普通库模块,W / O型的任何项目,你可以用你在你的答案中描述这三个步骤。恐怕是没有内置的用于创建模块,而底层的Andr​​oid项目的支持。

I just installed Android Studio 1.0 RC 4 and wondering how I could create an Android Library project. The solution shared in this post does not work anymore.

Update: I am not sure if this is enough to create a library project, but this are the steps I have done:

  1. Create a normal Android Project without an Activity
  2. Change apply plugin: 'com.android.application' to apply plugin: 'com.android.library' from build.gradle
  3. Delete the line applicationId "..." from build.gradle

解决方案

Accordingly to this document there is no such thing like 'Library project' or 'Application project'. There is 'Android project', which contains modules, and these can be application modules, library modules, test modules and so on.
I suggest you start with the project which consists of one library module. If later you'll find out that you need to add some tests, you'll add test module to this project. The same goes for the sample app which you'll someday (maybe) add to your library.
But, if for some reason you want to create plain library module, w/o any project, you can go with these three steps you described in your answer. I'm afraid there is no built-in support for creation of modules without underlying Android project.

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

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