Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
506 views
in Technique[技术] by (71.8m points)

android-studio - Android Studio未检测到我的模块(Android Studio not detecting my module)

I cloned my repo and now Android studio (1.3.1) is having hard time detecting my module 'app'

(我克隆了我的仓库,现在Android Studio(1.3.1)很难检测到我的模块“ app”)

It is not showing any module in edit configuration(as in image below).

(它未显示处于编辑配置的任何模块(如下图所示)。)

在此处输入图片说明


It's already defined in 'Settings.gradle'

(它已经在“ Settings.gradle”中定义)

include ':app'

I tried importing this app module but it says project already contains module with this name

(我尝试导入此应用程序模块,但它说project already contains module with this name)

Tried other solutions too.

(也尝试了其他解决方案。)

Stuck here.

(卡在这里。)

Note: This repo doesn't have .iml file of project.

(注意:此存储库没有项目的.iml文件。)

  ask by AskQ translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Different SDK installation worked for me.

How I came to know?:

(我怎么知道的?)
(Meanwhile 2 days passed in this issue, I tried all possible solutions like adding facets, adding modules etc. (I came to know it is working in other collegue's machine ) But they didn't work, So last option for me was fresh installation of Android Studio. So I...)

((此问题过去了两天,我尝试了所有可能的解决方案,例如添加构面,添加模块等。(我知道它可以在其他同事的计算机上工作),但是它们没有用,所以对我来说最后的选择是全新安装Android Studio。所以我...))

1. Installed Android Studio 2.2.3 with different sdk location unknowingly(Let's say loc2 ).

(1.在不知不觉中安装了具有不同sdk位置的Android Studio 2.2.3(假设loc2 )。)
2. It was working, later I made batch update to 2.3.2.

(2.工作正常,后来我将批次更新为2.3.2。)

After update, I chose project location as sdk location (Lets say loc1 ).

(更新后,我选择项目位置作为sdk位置(假设为loc1 )。)

This time it din't work and I got same error.

(这次它不起作用,我也遇到了同样的错误。)

This was a moment when switching to loc2 worked!!

(这是切换到loc2的片刻!!)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...