23

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?

choster
  • 130
  • 1
  • 7
Rose Perrone
  • 61,572
  • 58
  • 208
  • 243
  • possible duplicate of [AndroidManifest.xml is missing](http://stackoverflow.com/questions/12525969/androidmanifest-xml-is-missing) – dns Aug 30 '15 at 00:05

13 Answers13

6

This happened to me today.. I clicked "Sync Project with Gradle Files" and all went fine.

cozyconemotel
  • 1,121
  • 2
  • 10
  • 22
  • This happened in Android Studio on a very simple project which crashed before any save. Reopening the problems caused referred to module already disposed. The sync sorted all issues. – G O'Rilla Jun 17 '15 at 14:41
5

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.

Kevin
  • 781
  • 1
  • 9
  • 18
4

I use IntelliJ Idea and found next solution: in the root of the project (in catalog with root build.gradle) create file settings.gradle which consist include ':app' Than go to IDE and run Gradle - refresh.

anber
  • 3,463
  • 6
  • 39
  • 68
3

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)
dns
  • 2,753
  • 1
  • 26
  • 33
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

bentzy
  • 1,244
  • 2
  • 15
  • 31
2

When I get "AndroidManifest.xml file not found" error I clean and then refresh the project and these steps seem to fix the problem.

Y2i
  • 3,748
  • 2
  • 28
  • 32
2

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.

enter image description here

I hope it helps somebody.

Mr.Moustard
  • 1,297
  • 21
  • 24
1

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.

Jay
  • 252
  • 3
  • 12
0

open IDE

project

|--->build automatically

uncheck it clean the project

check build automatically opriot

0

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.

Mike Cheel
  • 12,626
  • 10
  • 72
  • 101
0

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!!!

Harshit Ruwali
  • 1,040
  • 2
  • 10
  • 22
0

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

yusufpats
  • 778
  • 4
  • 12
0
flutter upgrade --force 

Helped me.

Works for you?

Andrii Kovalchuk
  • 4,351
  • 2
  • 36
  • 31