简体   繁体   中英

AndroidManifest.xml file not found

I'm using git, and creating lots of git branches for new features on a project I'm working on. Every once in a while, I'll create a new branch off master as usual (let's call this broken-branch , and this error appears:

Android Source Generator: [demo] AndroidManifest.xml file not found

I'll create a new branch off master, cherrypick the changes on broken-branch onto this one, and everything works fine. Why do I get this error, and how can I avoid it?

这发生在我今天.. 我点击了“同步项目与 Gradle 文件”,一切顺利。

While my IDE is IDEA13 with maven. Work fine with maven in command line, while using IDEA run( shift + F10) show this error. I do as below and fix this: 1.Open .iml in the project root.
2.Find some line like:

<option name="USE_CUSTOM_COMPILER_MANIFEST" value="true" />

3.Remove this line or change value to false. This is my work way.
May Help.

我使用 IntelliJ Idea 并找到了下一个解决方案:在项目的根目录中(在带有根 build.gradle 的目录中)创建文件settings.gradle ,其中包含include ':app'然后转到 IDE 并运行 Gradle - 刷新。

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)

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

当我收到“找不到 AndroidManifest.xml 文件”错误时,我会清理并刷新项目,这些步骤似乎可以解决问题。

It happens to me when I don't have .iml file to open the project. It's very easy to fix, you just need to close the project and reopen it taking care of select build.gradle file before click open.

在此处输入图片说明

I hope it helps somebody.

This worked for me. My project already had a settings.gradle file. I simple had to add the line include ':app' . N ow i can build and do everything.

open IDE

project

|--->build automatically

uncheck it clean the project

check build automatically opriot

I just had this problem while trying to build the swagger code gen project. For whatever reason IntelliJ thought I should have an Android facet. Removing this facet allowed the entire project to build.

If in case, you encounter an error which shows:
AndroidManifest.xml file is not found
All that you have to do is reinstall the flutter package and the error is resolved!!!

Go File,Project Structure or press Ctrl+Shift+Alt+S,

Go Facets, Select your android project, in the structure there are configuration files, folders. Image of structure tab (before)

Location of AndroidManifest file was like this:

D:\\Programming\\Dart Flutter Projects\\tip_calculator\\AndroidManifest.xml

Change the location like this. Image of structure tab (after)

Changed it to here:

D:\\Programming\\Dart Flutter Projects\\tip_calculator\\android\\app\\src\\profile\\AndroidManifest.xml

flutter upgrade --force 

Helped me.

Works for you?

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