Skip to main content
Oldes
Inspiring
March 12, 2018
Question

dx tool failed on macOS with: Invalid value for MonthOfYear

  • March 12, 2018
  • 0 replies
  • 417 views

Hi,

I'm working on native extension for Android, which needs quite a lot external libs. I can build a test app using it without problems on Windows, but when I try to build the same on macOS, I get error:

UNEXPECTED TOP-LEVEL EXCEPTION:

java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0

  at java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)

  at java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:714)

  at java.base/java.time.LocalDate.of(LocalDate.java:269)

  at java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)

  at java.base/java.util.zip.ZipUtils.dosToJavaTime(ZipUtils.java:82)

  at java.base/java.util.zip.ZipUtils.extendedDosToJavaTime(ZipUtils.java:101)

  at java.base/java.util.zip.ZipEntry.getTime(ZipEntry.java:198)

  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)

  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)

  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)

  at com.android.dx.command.dexer.Main.processOne(Main.java:637)

  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:506)

  at com.android.dx.command.dexer.Main.runMultiDex(Main.java:335)

  at com.android.dx.command.dexer.Main.run(Main.java:245)

  at com.android.dx.command.dexer.Main.main(Main.java:215)

  at com.android.dx.command.Main.main(Main.java:106)

And follows a lot of warnings like:

warning: Ignoring InnerClasses attribute for an anonymous inner class

(com.tencent.mm.sdk.b.c) that doesn't come with an

associated EnclosingMethod attribute. This class was probably produced by a

compiler that did not target the modern .class file format. The recommended

solution is to recompile the class from source, using an up-to-date compiler

and without specifying any "-target" type options. The consequence of ignoring

this warning is that reflective operations on this class will incorrectly

indicate that it is *not* an inner class.

Any idea what may be a problem? I tried AIR 27 and AIR 29 and the result is same.

This is Java I have on macOS:

java 9.0.1

Java(TM) SE Runtime Environment (build 9.0.1+11)

Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

This topic has been closed for replies.