当前位置: 代码迷 >> Android >> 编译android 4.0.3的时候出现异常
  详细解决方案

编译android 4.0.3的时候出现异常

热度:98   发布时间:2016-05-01 12:33:56.0
编译android 4.0.3的时候出现错误。
1.先下载google 源码编译,通过
2.然后按照需求修改framework里面的代码
3.然后再编译就出现如下提示:
make -j8
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
Checking API: checkapi-last
Checking API: checkapi-current
Install: out/host/linux-x86/bin/dx-tests
Copy: vm-tests (out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/vm-tests)
Install: out/host/linux-x86/framework/layoutlib.jar
com.google.doclava.apicheck.ApiParseException: Error parsing API
at com.google.doclava.apicheck.XmlApiFile.parseApi(XmlApiFile.java:60)
at com.google.doclava.apicheck.ApiCheck.parseApi(ApiCheck.java:152)
at com.google.doclava.apicheck.ApiCheck.checkApi(ApiCheck.java:108)
at com.google.doclava.apicheck.ApiCheck.main(ApiCheck.java:67)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1024)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.google.doclava.apicheck.XmlApiFile.parseApi(XmlApiFile.java:54)
... 3 more
Error parsing API

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1) You can add "@hide" javadoc comments to the methods, etc. listed in the
      errors above.

   2) You can update current.txt by executing the following command:
         make update-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************



make: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] 错误 38
make: *** 正在等待未完成的任务....
  相关解决方案