Reputation: 1489
So I am unable to execute the project due to this error. Now, I tried the following techniques that I saw on here: -Rebuilt and cleaned the project -Restarted Android Studio -Created a new project and Readded the files, running the project after every major file was added.
Now, the third problem provided me with some clues. When I added a fragment and put some code in and ran the project, I got the following 2 errors :
Error:(1) Error parsing XML: XML declaration not well-formed
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Temp\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
When I opened the gradle console I saw the following:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Temp\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I am a beginner programmer so I am not really sure what to make of this.
Any help will be appreciated. I have attached the code from the fragment.xlm below:
<?xml verion="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textTitle"
android:text="" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/textDescription" />
</LinearLayout>
Upvotes: 0
Views: 422
Reputation: 4646
"Error parsing XML: XML declaration not well-formed" means that there is a problem compiling your XML file, such as an incorrect namespace, and extra/stray character, a missing or misplaced closing or opening tag, or other spelling mistake.
In your case there is a spelling error on the first line.
<?xml verion="1.0" encoding="UTF-8"?>
Should be:
<?xml version="1.0" encoding="UTF-8"?>
Upvotes: 3