Error: Project 'app' not found in root project 'projectName'

妖精的绣舞 提交于 2019-12-20 04:48:07

问题


I have an old app developed in Eclipse and now trying to migrate it to Android Studio.

I updated the libraries and followed the basic steps.
Now, I am getting this error: Error: Project 'app' not found in root project 'projectName'.

I am using classpath 'com.android.tools.build:gradle:3.0.1' and latest gradle 4.1.

Can anyone help on this?


回答1:


I think your project is too old.

Here is a classpath use it. Then your project will ask for update and Project will automatically update to latest version. It work like mid upgrade then high upgrade for too old project. Actually it work for me many times. I am not sure but you can try this. Use this instead of latest class path.

classpath 'com.android.tools.build:gradle:2.3.0-alpha2'



回答2:


Check whether you have renamed your project or opened the wrong directory, the android project will be in the inner directory of the main directory that you just opened. Also post a screenshot of your project hierarchy.




回答3:


In case anyone is still looking for solution, please verify if you have any issue with settings.gradle.

settings.gradle should contain below strings:

**include ':app'**


来源:https://stackoverflow.com/questions/49278875/error-project-app-not-found-in-root-project-projectname

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!