Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New font resources not recognized #306

Open
Mygod opened this issue May 18, 2017 · 8 comments
Open

New font resources not recognized #306

Mygod opened this issue May 18, 2017 · 8 comments
Labels

Comments

@Mygod
Copy link

Mygod commented May 18, 2017

Failed to parse src/main/res/font/iceland.ttf
src/main/res/font/iceland.ttf:1:1: Error: Content is not allowed in prolog.
  at com.android.ide.common.res2.MergingException$Builder.build(MergingException.java:134)
  at com.android.ide.common.res2.ValueResourceParser2.parseDocument(ValueResourceParser2.java:219)
  at com.android.ide.common.res2.ValueResourceParser2.parseFile(ValueResourceParser2.java:92)
  at com.android.ide.common.res2.ResourceSet.createResourceFile(ResourceSet.java:472)
  at com.android.ide.common.res2.ResourceSet.parseFolder(ResourceSet.java:423)
  at com.android.ide.common.res2.ResourceSet.readSourceFolder(ResourceSet.java:232)
  at com.android.ide.common.res2.DataSet.loadFromFiles(DataSet.java:248)
  at com.android.ide.common.res2.ResourceSet.loadFromFiles(ResourceSet.java:53)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:290)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:289)
  at scala.collection.immutable.List.foreach(List.scala:318)
  at android.Resources$.fullResourceMerge(resources.scala:289)
  at android.Resources$.android$Resources$$merge$1(resources.scala:177)
  at android.Resources$.incrResourceMerge(resources.scala:183)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:153)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:150)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Resources$.doCollectResources(resources.scala:156)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:496)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:495)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:862)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:860)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Tasks$.withCachedRes(tasks.scala:863)
  at android.Tasks$$anonfun$47.apply(tasks.scala:495)
  at android.Tasks$$anonfun$47.apply(tasks.scala:474)
  at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
  at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
  at sbt.std.Transform$$anon$4.work(System.scala:63)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
  at sbt.Execute.work(Execute.scala:237)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
  at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  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:748)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
  at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:994)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
  at com.android.utils.PositionXmlParser.parse(PositionXmlParser.java:183)
  at com.android.utils.PositionXmlParser.parse(PositionXmlParser.java:191)
  at com.android.utils.PositionXmlParser.parse(PositionXmlParser.java:141)
  at com.android.utils.PositionXmlParser.parse(PositionXmlParser.java:103)
  at com.android.utils.PositionXmlParser.parse(PositionXmlParser.java:112)
  at com.android.ide.common.res2.ValueResourceParser2.parseDocument(ValueResourceParser2.java:213)
  at com.android.ide.common.res2.ValueResourceParser2.parseFile(ValueResourceParser2.java:92)
  at com.android.ide.common.res2.ResourceSet.createResourceFile(ResourceSet.java:472)
  at com.android.ide.common.res2.ResourceSet.parseFolder(ResourceSet.java:423)
  at com.android.ide.common.res2.ResourceSet.readSourceFolder(ResourceSet.java:232)
  at com.android.ide.common.res2.DataSet.loadFromFiles(DataSet.java:248)
  at com.android.ide.common.res2.ResourceSet.loadFromFiles(ResourceSet.java:53)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:290)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:289)
  at scala.collection.immutable.List.foreach(List.scala:318)
  at android.Resources$.fullResourceMerge(resources.scala:289)
  at android.Resources$.android$Resources$$merge$1(resources.scala:177)
  at android.Resources$.incrResourceMerge(resources.scala:183)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:153)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:150)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Resources$.doCollectResources(resources.scala:156)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:496)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:495)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:862)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:860)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Tasks$.withCachedRes(tasks.scala:863)
  at android.Tasks$$anonfun$47.apply(tasks.scala:495)
  at android.Tasks$$anonfun$47.apply(tasks.scala:474)
  at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
  at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
  at sbt.std.Transform$$anon$4.work(System.scala:63)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
  at sbt.Execute.work(Execute.scala:237)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
  at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  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:748)
src/main/res/font/iceland.ttf:1:1: Error: Content is not allowed in prolog.
  at com.android.ide.common.res2.MergingException.throwIfNonEmpty(MergingException.java:152)
  at com.android.ide.common.res2.DataSet.loadFromFiles(DataSet.java:257)
  at com.android.ide.common.res2.ResourceSet.loadFromFiles(ResourceSet.java:53)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:290)
  at android.Resources$$anonfun$fullResourceMerge$2.apply(resources.scala:289)
  at scala.collection.immutable.List.foreach(List.scala:318)
  at android.Resources$.fullResourceMerge(resources.scala:289)
  at android.Resources$.android$Resources$$merge$1(resources.scala:177)
  at android.Resources$.incrResourceMerge(resources.scala:183)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:153)
  at android.Resources$$anonfun$doCollectResources$8.apply(resources.scala:150)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Resources$.doCollectResources(resources.scala:156)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:496)
  at android.Tasks$$anonfun$47$$anonfun$apply$49.apply(tasks.scala:495)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:862)
  at android.Tasks$$anonfun$withCachedRes$1.apply(tasks.scala:860)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:206)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
  at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
  at sbt.Difference.apply(Tracked.scala:224)
  at sbt.Difference.apply(Tracked.scala:200)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
  at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
  at android.Tasks$.withCachedRes(tasks.scala:863)
  at android.Tasks$$anonfun$47.apply(tasks.scala:495)
  at android.Tasks$$anonfun$47.apply(tasks.scala:474)
  at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
  at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
  at sbt.std.Transform$$anon$4.work(System.scala:63)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
  at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
  at sbt.Execute.work(Execute.scala:237)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
  at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
  at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  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:748)

Related doc: https://developer.android.com/preview/features/fonts-in-xml.html

@pfn
Copy link
Member

pfn commented May 22, 2017

blocked by android build tools 3.0 showing up on maven central.

http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.android.tools.build%22

Unless 2.3.0 already includes that support, which I very much doubt.

@Mygod
Copy link
Author

Mygod commented Jul 29, 2017

Hmm perhaps they are publishing it at maven.google.com? It hasn't been updated for a long time.

EDIT: Confirmed. They're releasing it there.

@pfn
Copy link
Member

pfn commented Jul 29, 2017 via email

@Mygod
Copy link
Author

Mygod commented Aug 7, 2017

What do you mean by final release? Maybe they're never going to release it at public maven repository.

@pfn
Copy link
Member

pfn commented Aug 7, 2017 via email

@Mygod
Copy link
Author

Mygod commented Oct 25, 2017

3.0.0 is released. Source: https://developer.android.com/studio/releases/gradle-plugin.html

@Mygod
Copy link
Author

Mygod commented Nov 8, 2017

So is this project dead?

@pfn
Copy link
Member

pfn commented Nov 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants