ERROR: Android Source Generator: [project] Android

2019-03-11 14:15发布

I am a newbie to android , using intellij idea. when I want to compile my hello-world ( the first step ;) ) I faced with this error "Android Source Generator: [project] AndroidManifest.xml file not found"

Of course it is not in my root file. And when I make any new project , I have the same problem.

I searched a lot and even find this "AndroidManifest.xml file not found " but not help.

plz help .

12条回答
狗以群分
2楼-- · 2019-03-11 14:53

When I checkout an android project use Android Studio, I see the same problem. I try to new an Android module in the project, then the problem solved.

查看更多
时光不老,我们不散
3楼-- · 2019-03-11 14:54

you must open Project Structure modified something.

example: Project Structure > Facets ,you can see this is: enter image description here

delete ".idea", like this enter image description here

ok, IDE there find AndroidManifest.xml

查看更多
时光不老,我们不散
4楼-- · 2019-03-11 14:56

Open the Gradle Sync tab, check for any errors there. If there is a link to "Install Repository and sync project" click it to install the missing components.

查看更多
何必那么认真
5楼-- · 2019-03-11 14:59

If you are using Maven, backup the project and close it. Open IntelliJ and select Open..., choose the pom.xml file and then select yes to open this project. Because there is already a project a popup should appear, choose 'Delete Existing Project and Import'.

Note: I'm using IntelliJ Community Edition version 13

I believe this question is a duplicate of this question: AndroidManifest.xml file not found

查看更多
迷人小祖宗
6楼-- · 2019-03-11 14:59

Go to the directory where you have installed Android SDK. There, go to tools directory. Note down the path of tools directory.

Open command prompt/terminal, and cd to tools directory:

cd <tools directory path>

Run command:

android update project -p <path to project directory> -n <name of project> -t android-15

To create a new project:

android create project -p <path to project directory> -n <name of project> -k <package name> -a <hello world activity name> -t <android version like: android-15>
查看更多
走好不送
7楼-- · 2019-03-11 14:59

Simply, Move your project folder to default project directory

/home/USER/AndroidStudioProjects/

This solves my issue . Hope This helps!!!

查看更多
登录 后发表回答