问题描述
- Error parsing XML: junk after document element
-
SET_BTU.XML(自己写的)文件最后面出现了一长长的红色波浪线打底的语句:04-16 16:53:07.066: E/AndroidRuntime(25817): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.huyubao/com.example.huyubao.MainActivity}: android.view.InflateException: Binary XML file line #30: Error inflating class com.android.internal.widget.ActionBarView
这是什么意思?怎么解决呀?错误提示:
Error:(16) Error parsing XML: junk after document element
Error:(16) Execution failed for task ':app:processDebugResources'.com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:UsersAdministratorAppDataLocalAndroidsdkbuild-tools21.1.2aapt.exe package -f --no-crunch -I C:UsersAdministratorAppDataLocalAndroidsdkplatformsandroid-21android.jar -M D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatesmanifestsfulldebugAndroidManifest.xml -S D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatesresdebug -A D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatesassetsdebug -m -J D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildgeneratedsourcerdebug -F D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatesresresources-debug.ap_ --debug-mode --custom-package com.xfengche.wwww.xfegncheradio_net -0 apk --output-text-symbols D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatessymbolsdebug
Error Code:
1
Output:
D:android-studioexercisesvn_小风车xfegnche.radio_netappbuildintermediatesresdebugdrawableset_btn.xml:16: error: Error parsing XML: junk after document element
解决方案
XML文件格式是否合法,含有垃圾字符