在哪里可以找到/设置了Android Studio中“神器”? [英] Where to find/set up for 'Artifact' in Android Studio?

查看:805
本文介绍了在哪里可以找到/设置了Android Studio中“神器”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android开发启动。环境,我在哪里,我想我的应用程序分发到更广泛的测试环境比我自己的手机和模拟器的地步。

I'm starting up in the Android dev. environment, and I'm at the point where I'd like to distribute my apps to a wider test environment than my own phone and simulator.

根据这些方针,我一直在试图建立一个签名的apk调试,我可以通过电子邮件,安装等。
我的问题是,如何做到这一点很多很多指令提供了一套它在你的Andr​​oid工作室转到文件开头的步骤,选择项目结构,然后点击你的左侧窗格中文物。

Along these lines, I've been trying to build a signed debug apk which i can email, install, etc. My problem is that many many instructions on how to do this provide a set of steps which begin with "Go to 'File' in your Android Studio, select 'Project Structure' and then click 'Artifacts' in your left pane.

问题是...我没有在我的左窗格中的神器。我有一个'SDK位置,计划,并在模块的应用。

Problem is ...i don't have any 'Artifacts' in my left pane. I've got an 'SDK Location', 'Project' and under 'Modules' an 'app'.

我检查我已经建立的其他项目和无那些有文物无论是。
所以...在哪里,我怎么设置我的环境,让我在我的左窗格中的这个'文物',我apprantly需要设置我的签字调试APK。

I've checked the other projects I've built and none of those have an 'Artifacts' either. So...where, how do I set up my environment so that I have this 'Artifacts' in my left pane which I apprantly need to set up my signed debug apk.

我使用的Andr​​oid Studio版本1.1.0。

I'm using Android Studio Version 1.1.0.

非常感谢。

推荐答案

我开始的时候有这个问题为好。

I had this issue as well when starting.

问题是,如果你的任何模块有一个的Manifest.xml 文件,会自动假设你需要一个AAR和所有模块,即使是Java模块将步其后尘。

The problem is that if any of your modules have a Manifest.xml file, AS will automatically assume you need an aar and all modules, even if they are java modules will follow suit.

为了弥补,你将不得不创建一个没有活动的新项目,关闭工作室。然后进入该应用程序住在该目录中。删除默认应用文件夹,并更新 settings.gradle 删除包括应用程序

In order to remedy, you will have to create a new project with no activity, close the studio. Then go to the directory that the app lives at. Delete the default app folder and update the settings.gradle to remove the include of 'app'.

刷新该项目,AS会承认它是一个java唯一项目,当你preSS F4 为模块的设置,你会看到你添加的选项<其中一个code>文物,是罐子。

Reload the project and AS will recognize it is a java only project and when you press F4 for module settings you will see you have the option to add artifacts, one of which is jar.

另一个认为要记住,如果你正在开发Android只是罐子(显然非常有可能),你需要去选项卡,并从Maven的添加 com.google.android:android:{版本} 所以,你可以建立你的项目。范围设置为提供,因为任何人在使用它会提供这种依赖性。

Another think to keep in mind, if you are developing android only jar's (obviously very likely), you will need to go to libraries tab and add from maven the com.google.android:android:{version} so the you can build your project. Set the scope to provided since whomever is using it will provide that dependency.

最新版本,因为这帖子是 4.1.1.4

Most recent version as of this post is 4.1.1.4

编辑:

如果您设置的项目SDK是一个Android的变种,你不会需要包括了Android库。

If you set the project SDK to be of an Android variant, you won't need to include the android library.

这篇关于在哪里可以找到/设置了Android Studio中“神器”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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