简体   繁体   中英

App module disappeared in android studio

I had app module running on my android studio project until I pressed delete by mistake. I am now unable to run my project as it doesn't detect app module.

I can see app folder in project view (containing build, libs, src folders) but I don't see it in android view or configuration setting where it says

I have an old apk file of the project.

I shared my project on github. Please help me get my module back so that I can run my project.

我所要做的就是 File->Sync 项目与 gradle 文件。

In order to not risk and further modify your content, try and clone again your android repo elsewhere and see if your module shows up there.

If it does, copy it back in your current repo.

I had this same issue, twice now. The first time, a full clean/rebuild did the trick. The second time, this didn't work. What did resolve the problem was opening the settings.gradle file and copying everything, then removing it to leave an empty file. Then save and resync Gradle. This failed, but then I pasted the old contents back into the file and did a resync again, which then fixed the issue.

Not sure what the problem was in the first place, but this worked for me so I figured I'd share.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM