ERROR: Android Source Generator: [project] AndroidManifest.xml file not found
Asked Answered
S

14

45

I am new to Android programming; I am using Intellij IDEA. When I compile my hello-world program, I get this error "Android Source Generator: [project] AndroidManifest.xml file not found"

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

I found this question: AndroidManifest.xml file not found, but it didn't help. How do I fix this?

Scofflaw answered 28/7, 2013 at 18:21 Comment(12)
Where in your project structure is androidmanifest.xml? Is it in the root?Diplosis
no it is not! yesterday I ran it but today i have this problem!Scofflaw
So where is it? You've searched the project?Diplosis
I don't know! :( it's not so I got this problem! can I add this file by myself?Scofflaw
f it ran yesterday, then it was there. You've either deleted it or moved it. Is it in the local history in IDEA?Diplosis
how i must rebuild the project? it will solve?Scofflaw
Delete your project and start again lolAlicea
I done it but now In every new project I have this problem , even I can not make an emulator .Scofflaw
yeah, I also encountered this problem with new IDEA. Is this a bug ?Tamishatamma
This may help:#16908722Giordano
Installing the new version of Intellijj idea solved my problem !Scofflaw
possible duplicate of AndroidManifest.xml is missingTamishatamma
T
4

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)
Tamishatamma answered 28/8, 2013 at 17:26 Comment(4)
You need to re-create new project using (Android application module), not Java projectTamishatamma
if you still using your old projects, it will always fail, because IDEA doesn't generate AndroidManifest.xml when using (Java project) as new project SDK.Tamishatamma
tnx for ur answer , but nothing change.Scofflaw
indeed one of my modules changed to Android configuration while it was a Java module (not sure why it happened but it is other story). I removed Android configuration in Project Structure / Modules / <Your Module> and it solved the issueBebebebeerine
G
50

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

Gram answered 21/12, 2014 at 16:39 Comment(1)
it's not working. ide can't find androidManifest.xml at the update location.Occult
T
4

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)
Tamishatamma answered 28/8, 2013 at 17:26 Comment(4)
You need to re-create new project using (Android application module), not Java projectTamishatamma
if you still using your old projects, it will always fail, because IDEA doesn't generate AndroidManifest.xml when using (Java project) as new project SDK.Tamishatamma
tnx for ur answer , but nothing change.Scofflaw
indeed one of my modules changed to Android configuration while it was a Java module (not sure why it happened but it is other story). I removed Android configuration in Project Structure / Modules / <Your Module> and it solved the issueBebebebeerine
A
4

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

Audryaudrye answered 22/12, 2013 at 10:8 Comment(0)
U
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.

Unpracticed answered 23/3, 2014 at 5:49 Comment(0)
U
4

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

Unopened answered 28/5, 2014 at 14:11 Comment(0)
S
3

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>
Scandalize answered 29/7, 2013 at 11:50 Comment(0)
N
2

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.

Nibbs answered 9/9, 2016 at 20:9 Comment(0)
N
2

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 strcuture tab (after)

Changed it to here: D:\Programming\Dart Flutter Projects\tip_calculator\android\app\src\profile\AndroidManifest.xml

Nettle answered 31/10, 2020 at 20:26 Comment(0)
C
1

Goto File -> New Project -> Android Project->continue and hit Finish.

Now go to File -> Import existing file system

Conterminous answered 26/6, 2015 at 7:13 Comment(0)
G
1

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.

Galloromance answered 15/7, 2015 at 14:57 Comment(0)
M
1

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.

Metacarpal answered 9/8, 2015 at 8:36 Comment(0)
O
1

Simply, Move your project folder to default project directory

/home/USER/AndroidStudioProjects/

This solves my issue . Hope This helps!!!

Occlude answered 8/11, 2017 at 12:39 Comment(0)
B
0

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.

Boride answered 2/2, 2016 at 22:26 Comment(0)
R
0

You can use flutter build apk. Just type the following in your terminal:

 flutter build apk --split-per-abi
Roscoeroscommon answered 30/6, 2021 at 19:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.