Android Studio 0.8.1 gradle sync失败

时间:2014-07-09 13:57:31

标签: android android-studio android-gradle

我在使用0.6.1时有一个工作项目,在我更新到0.8.1之后我得到了这个错误

  

错误:元素类型" meta"必须由匹配的结束标记终止""。

一旦gradle开始同步,启动新项目也会产生相同的错误。

IDE致命错误控制台:

Error on line 8: The element type "meta" must be terminated by the matching end-tag "</meta>".: Error on line 8: The element type "meta" must be terminated by the matching end-tag "</meta>".
org.jdom.input.JDOMParseException: Error on line 8: The element type "meta" must be terminated by the matching end-tag "</meta>".
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:533)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:364)
at com.intellij.facet.frameworks.SettingsConnectionService.readSettings(SettingsConnectionService.java:72)
at com.intellij.facet.frameworks.SettingsConnectionService.getSettingValue(SettingsConnectionService.java:112)
at com.intellij.facet.frameworks.SettingsConnectionService.getServiceUrl(SettingsConnectionService.java:104)
at com.android.tools.idea.stats.AndroidStatisticsService.areStatisticsAuthorized(AndroidStatisticsService.java:125)
at com.android.tools.idea.stats.StudioBuildStatsPersistenceComponent.addBuildRecordImmediately(StudioBuildStatsPersistenceComponent.java:103)
at com.android.tools.idea.stats.StudioBuildStatsPersistenceComponent$1.run(StudioBuildStatsPersistenceComponent.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:37)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 3; The element type "meta" must be terminated by the matching end-tag "</meta>".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
... 18 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 3; The element type "meta" must be terminated by the matching end-tag "</meta>".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:364)
at com.intellij.facet.frameworks.SettingsConnectionService.readSettings(SettingsConnectionService.java:72)
at com.intellij.facet.frameworks.SettingsConnectionService.getSettingValue(SettingsConnectionService.java:112)
at com.intellij.facet.frameworks.SettingsConnectionService.getServiceUrl(SettingsConnectionService.java:104)
at com.android.tools.idea.stats.AndroidStatisticsService.areStatisticsAuthorized(AndroidStatisticsService.java:125)
at com.android.tools.idea.stats.StudioBuildStatsPersistenceComponent.addBuildRecordImmediately(StudioBuildStatsPersistenceComponent.java:103)
at com.android.tools.idea.stats.StudioBuildStatsPersistenceComponent$1.run(StudioBuildStatsPersistenceComponent.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:37)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

有关如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:0)

我曾经遇到Gradle Sync失败,所以我手动下载了它。

有关Gradle的最新版本(目前为2.0),您可以从here下载。

然后将zip文件解压缩到任意位置,然后在Android Studio上,转到文件&gt;设置&gt; Gradle并选择Local Distribution并选择您的Gradle文件夹地址。

这对我有用,所以我建议你。欢呼声。