26

我最近刚刚升级到最新版本的 Android Studio (0.1.1),但我也使用 Android Studio 将我的项目重新定位到我的 Dropbox 文件夹。所以,我不确定是哪一个导致了这个问题。当我构建或尝试运行我的项目时,我收到此错误:

Cannot start compilation: the output path is not specified for modules
 "actionbarsherlock",
"EmPubLite-EmPubLite".
Specify the output path in Configure Project.

我找不到对“配置项目”的任何引用,并且文件下的项目结构选项在此版本中不再起作用。

4

7 回答 7

31

Android Studio 版本 < 1.0 的解决方案:

您只需转到您的模块设置 > 项目并指定“项目编译器输出”并让您的模块从项目继承。(为此,请转到模块 > 路径 > 继承项目。

或者,您可以根据需要为每个模块指定输出。

于 2013-06-28T14:38:26.387 回答
22

In order to do so you just need to follow this steps:

  1. Open Project structure (F4 on one of the modules in the project explorer)
  2. Click on Project tab on the left
  3. Define "Project compiler output:" as YOUR_PROJECT_PATH\out (or any folder you want)
  4. Click on Modules tab on the left
  5. Go over all your modules and verify that under the Paths tab the Compiler output is set to "Inherit project compile output path"
于 2014-07-26T17:39:48.503 回答
8

I ended up re-importing the project using Gradle and it's back to normal. Very weird issue.

于 2014-01-24T23:19:12.207 回答
2

this is a problem that I face in case I open my phonegap project with Android Studio and Webstorm. They are IntelliJ-based project and I guess they are both writing the files in .idea

Reimporting the project is the solution.

于 2014-03-09T07:44:39.063 回答
2

got same error while using studio feature to import from GitHub repository. I deleted the whole project and .. cloned it using git terminal and imported as new project ... studio prompted to add VCS root, accepted ....everything was fine afterwards. As @lordhong prompted.

于 2016-05-27T06:44:56.167 回答
1
于 2013-09-07T11:28:12.080 回答
1

How I finally managed to fix after hours! File -> Project Structure -> Facets -> choose module's facet -> Packaging. Enter in APK Path absolute path to apk to be created: C:\workspace\MyCompany\MyProject\myProject.apk Press ok and run your project

于 2014-08-09T22:14:24.257 回答