XML Parsing error: no element found. How to resolve it?

霸气de小男生 提交于 2019-12-04 02:50:32

问题


I am beginner on Android Studio and I found an error during Android app development that the Android Studio shows:

XML Parsing error: no element found

How do I resolve it?

Error is still maintained after adding some suggestions. please review it.

Now it Shows : Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

Configuration on demand is an incubating feature. NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Karim Bux\AppData\Local\Android\Sdk\ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead. The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead. The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library :app:prepareComAndroidSupportAppcompatV72600Alpha1Library :app:prepareComAndroidSupportConstraintConstraintLayout100Alpha7Library :app:prepareComAndroidSupportSupportCompat2600Alpha1Library :app:prepareComAndroidSupportSupportCoreUi2600Alpha1Library :app:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library :app:prepareComAndroidSupportSupportFragment2600Alpha1Library :app:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library :app:prepareComAndroidSupportSupportV42600Alpha1Library :app:prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources :app:processDebugManifest UP-TO-DATE :app:processDebugResources :app:generateDebugSources :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareComAndroidSupportTestEspressoEspressoCore222Library :app:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library :app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library :app:prepareComAndroidSupportTestRules05Library :app:prepareComAndroidSupportTestRunner05Library :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl UP-TO-DATE :app:processDebugAndroidTestManifest UP-TO-DATE :app:compileDebugAndroidTestRenderscript UP-TO-DATE :app:generateDebugAndroidTestBuildConfig UP-TO-DATE :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources UP-TO-DATE :app:mergeDebugAndroidTestResources UP-TO-DATE :app:processDebugAndroidTestResources UP-TO-DATE :app:generateDebugAndroidTestSources UP-TO-DATE :app:mockableAndroidJar UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE :app:prepareDebugUnitTestDependencies

BUILD SUCCESSFUL in 7s 34 actionable tasks: 21 executed, 13 up-to-date

should i build a new project or not ?

My error Screenshot 1

My error screenshot 2

<?xml version="1.0" encoding="utf-8"?>
   <RelativeLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@android:color/holo_blue_light"
                tools:context="comhanumanbeniwaloffice.facebook.www.hanumanbeniwal.MainActivity" >

    <Button
        android:id="@+id/button"
        style="@android:style/Widget.Button"
        android:layout_width="350dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="13dp"
        android:background="@android:color/holo_green_light"
        android:elevation="0dp"
        android:text="परिचय"
        android:textStyle="bold"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        android:textSize="40dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />

    <Button
        android:id="@+id/button2"
        style="@android:style/Widget.Button"
        android:layout_width="350dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="17dp"
        android:background="@android:color/holo_orange_dark"
        android:text="Latest News"
        android:textStyle="bold"
        android:textSize="40dp"
        android:visibility="visible"
        android:layout_below="@+id/button"
        android:layout_alignLeft="@+id/button"
        android:layout_alignStart="@+id/button" />

    <Button
        android:id="@+id/button9"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_below="@+id/button2"
        android:layout_marginTop="37dp"
        android:background="?android:attr/colorPressedHighlight"
        android:text="ब्लॉग"
        android:textAppearance="@style/TextAppearance.AppCompat.Menu"
        android:textSize="40dp" />

    <Button
        android:id="@+id/button10"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/button9"
        android:layout_alignBottom="@+id/button9"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:background="@android:color/holo_green_light"
        android:text="तस्वीरें"
        android:textSize="40dp" />

    <Button
        android:id="@+id/button11"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:text="विडियो"
        android:textSize="40dp"
        android:layout_below="@+id/button9"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_marginTop="47dp" />

    <Button
        android:id="@+id/button12"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:text="लाइव"
        android:textSize="40dp"
        android:layout_alignBaseline="@+id/button11"
        android:layout_alignBottom="@+id/button11"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true" />

    <Button
        android:id="@+id/button13"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_below="@+id/button11"
        android:layout_marginTop="35dp"
        android:background="?android:attr/colorPressedHighlight"
        android:text="Speech"
        android:textAppearance="@android:style/TextAppearance"
        android:textSize="40dp"
        android:textStyle="bold" />

    <Button
        android:id="@+id/button14"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/holo_green_light"
        android:text="Contact"
        android:textSize="35dp"
        android:layout_alignBaseline="@+id/button13"
        android:layout_alignBottom="@+id/button13"
        android:layout_alignRight="@+id/button2"
        android:layout_alignEnd="@+id/button2"  />

来源:https://stackoverflow.com/questions/45429973/xml-parsing-error-no-element-found-how-to-resolve-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!