Failed to query the value of property 'namespace'

18.1k Views Asked by At

After I update my AndroidStudio to Artctic Fox.I get the following tips when I create a new project:

AILURE: Build failed with an exception.

* What went wrong:
Failed to query the value of property 'namespace'.
org.xml.sax.SAXParseException; systemId: file:/E:/AndroidLiaoProject/Test20210929/app/src/main/AndroidManifest.xml; lineNumber: 1; columnNumber: 1; ǰ���в����������ݡ�
ǰ���в����������ݡ�

How can I solve it?

6

There are 6 best solutions below

0
On

In my case, I have duplicate "windowSoftInputMode" in my xml file.

0
On

You can use this: Go to Build-> Clean project and Rebuild project. It works ... OR (If clean project is not working/showing error) Delete the build folder manually from "C Drive"

0
On

Sometimes the missing part is in manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.project.core"/> 

In my case I had a module and missing part in my manifest was package="com.project.core"

0
On

my problem was I did not define the package inside the manifest.xml like:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    **package="xx.xxx.xxxx"**>
0
On

I had a similar error when I used Android Studio's template to add a ComposeActivity to an existing android project. My working solution was to remove extra stuff that was added to the AndroidManifest.xml file, and then to add my ComposeActivity to the AndroidManifest.xml file manually.

0
On

My installation of Android Studio is completely offline. To resolve these kind of problems I have used the Process Monitor. It showed that a few files are missing within "Android Studio\gradle\m2repository". I have downloaded all files from

http://repo1.maven.org/maven2/junit/junit/4.12/ http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/ repo1.maven.org/maven2/org/hamcrest/hamcrest-parent/1.3/ (I can only post two links...;-)) and copied these files in "Android Studio\gradle\m2repository". You have to create the structure below "m2repository" as it is below "maven2". Maybe there are more missing files, but at this time at least Gradle build is finished without errors.