解析XML时出错:标记XOSP不匹配

时间:2017-11-02 17:46:08

标签: java android c++

我正在尝试编译android rom但是我在构建时遇到错误。 错误和xml文件行如下:

我得到的错误:

device/sony/shinano-common/overlay/frameworks/base/core/res/res/values/cr_config.xml:18: error: Error parsing XML: mismatched tag

build/core/package_internal.mk:389: recipe for target '/home/yanun/XOSP/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk' failed
make: *** [/home/yanun/XOSP/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file '/home/yanun/XOSP/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (04:23 (mm:ss)) ####

cr_config.xml的所有行

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

   <!-- Whether cpu boost is enabled for application's 1st launch. -->
    <bool name="config_enableCpuBoostForAppLaunch">true</bool>
  <!-- <integer name="launchboost_timeout_param">2000</integer> -->
   <!-- <integer-array name="launchboost_param_value"> -->
        <item>0x40804000</item> <!-- CPUBOOST_MAX_FREQ Core resource opcode-->
        <item>0xFFF</item>     <!-- CPUBOOST MAX_FREQ resource value-->
        <item>0x40800000</item> <!-- CPUBOOST_MIN_FREQ Core resource opcode-->
        <item>0xFFF</item>     <!-- CPUBOOST MIN_FREQ resource value-->
        <item>0x41800000</item> <!-- CPUBW_MIN_FREQ resource opcode-->
        <item>140</item>       <!-- CPUBW_MIN_FREQ resource value-->
        <item>0x40400000</item> <!-- POWER COLLAPSE resource opcode-->
        <item>0x1</item>        <!-- POWER COLLAPSE resource value-->
        <item>0x42C10000</item> <!-- STORAGE CLK SCALING resource opcode-->
        <item>0x1</item>        <!-- STORAGE CLK SCALING resource value-->
   </integer-array>- 18 LINE
  <!-- <bool name="config_enableCpuBoostForOverScrollerFling">true</bool> -->
  <!-- <integer-array name="flingboost_param_value"> -->
        <item>0x41800000</item> <!-- CPUBW_MIN_FREQ resource opcode-->
        <item>0x33</item>       <!-- CPUBW_MIN_FREQ resource value-->
        <item>0x40800000</item> <!-- CPUBOOST_MIN_FREQ CORE resource opcode -->
        <item>0x4B0</item> <!-- CPUBOOST MIN_FREQ resource value -->
        <item>0x40C28000</item> <!-- SCHEDGROUP resource opcode-->
        <item>0x1</item>        <!-- SCHEDGROUP resource value-->
   </integer-array>

< <!-- <bool name="config_enableCpuBoostForScroller">true</bool> -->
  <!-- <integer-array name="scrollboost_param_value"> -->
        <item>0x40800000</item> <!-- CPUBOOST_MIN_FREQ CORE resource opcode -->
        <item>0x506</item> <!-- CPUBOOST MIN_FREQ resource value -->
   </integer-array>


    <!-- Extended Boosts for QPerformance -->

    <!-- Boost parameters which get passed to QPerformance -->
  <!-- <integer-array name="onbootboost_param_value"> -->
       <item>0x40804100</item> <!-- CPUBOOST_MAX_FREQ Core resource opcode-->
       <item>0xFFF</item>      <!-- CPUBOOST MAX_FREQ resource value-->
       <item>0x40800100</item> <!-- CPUBOOST_MIN_FREQ Core resource opcode -->
       <item>0x6A4</item>      <!-- CPUBOOST MIN_FREQ resource value -->
    </integer-array>

1 个答案:

答案 0 :(得分:1)

评论中有一个开头标记:

 <!-- <integer-array name="launchboost_param_value"> -->

但是在第18行,你有一个未注释的结束标记

</integer-array>

取消注释第一个开始标记以匹配结尾,或者将</integer-array>放入评论中:

<!-- </integer-array> -->

查看您的xml我想您需要取消注释起始标记。

注意:在第20行,第27行和第30行,第33行和第39行,第44行完全相同的标记时,您的错误相同2倍。

第29行还有一个错误,即行开头的符号<