scala-android / sbt-android

An easy-to-use sbt plugin for working with all Android projects
Other
741 stars 94 forks source link

New font resources not recognized #306

Open Mygod opened 7 years ago

Mygod commented 7 years ago
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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Possible. But this issue remains blocked until a final release of the android builder with font resource support is avail.

On Fri, Jul 28, 2017, 10:46 PM Mygod notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scala-android/sbt-android/issues/306#issuecomment-318806479, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfQxTjDk_u11fBcRXA5diAkuBSruC-Gks5sSschgaJpZM4Ne0lW .

Mygod commented 7 years ago

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

pfn commented 7 years ago

A non alpha/beta release

On Sun, Aug 6, 2017, 11:01 PM Mygod notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scala-android/sbt-android/issues/306#issuecomment-320575970, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfQxTXLYrq5sqww2uzMBLEVZFuHoPTLks5sVqg0gaJpZM4Ne0lW .

Mygod commented 7 years ago

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

Mygod commented 7 years ago

So is this project dead?

pfn commented 7 years ago

No

On Tue, Nov 7, 2017, 11:35 PM Mygod notifications@github.com wrote:

So is this project dead?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scala-android/sbt-android/issues/306#issuecomment-342734558, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfQxUoovQmN8hH3SEY6xBYbYIV2P2iWks5s0VmmgaJpZM4Ne0lW .