可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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 .
回答1:
you must open Project Structure modified something.
example:
Project Structure > Facets ,you can see this is:
delete ".idea", like this
ok, IDE there find AndroidManifest.xml
回答2:
I know the problem in IDEA because you create a new project with Java configuration (not android, but with android sdk dependency)
File > New Project > Java (Java Module) > Project SDK Android 4.X
Here is the solution :
File > New Project > Android (Application Module)
回答3:
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
回答4:
I used to have the same problem with Intellij 13 EAP, OS-X Mavericks, and a maven multi module Android project, where it was compiling fine by command line, but failing to rebuild/make thru the IDE.
Project Structure > Facets > select your Android project > 'Generated Sources' tab
check "Run 'process-resources' Maven task before Make" option.
回答5:
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>
回答6:
Please check your Build Tools version, it must be same in build.gradle file, for example:
buildToolsVersion "19.0.3"
So, open Android SDK Manager, check your revision of Build Tools.
After changes, go to Build -> Clean Project
回答7:
Goto File -> New Project -> Android Project->continue and hit Finish.
Now go to File -> Import existing file system
回答8:
I solved this problem this way: I created another project using the default configuration and without closing this new project opened the old project with the Android Source Generator: [project] AndroidManifest.xml file not found ERROR.
回答9:
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.
回答10:
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.
回答11:
There may be more than one answer to this. Check that your Android project is not under another directory of the same name. Android Studio is easily confused by this.
For example, change:
/Development/MyProject/MyProject/app/...
to this structure:
/Development/MyProject/app/...
When I changed this in my own project, it went from refusing to build to doing an auto-build on opening the project. Hope this is useful.
回答12:
Simply, Move your project folder to default project directory
/home/USER/AndroidStudioProjects/
This solves my issue .
Hope This helps!!!