While signing the apk, I am getting the following error :
jarsigner error: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
I am using Ubuntu, and following is my ionic info
Your system information:
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.4
Xcode version: Not installed
I am stuck, please help me out… 
jonchin
2
I ran into the exact same problem. I was running openjdk version 9
I downgraded to version 8 and it worked.
Yeah, that was the reason. I figured it out myself as well, but thanks for replying.
Hi @himanshu_signcatch @jonchin,
I have the same problem,
when i type java -version in terminal this was my output
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
and for javac -version
javac 1.8.0_131
but still i am getting error --> jarsigner error: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
Any help Please.
Thanks
alesub
5
Hi,
I’m also having this problem despite my java version is 8… did you get to solve it?
Thanks!
MomenSh
6
Hi,
I have the same issue, Ionic 3 and java 8 installed … I’m on Kubuntu 17.04
$ ionic info
cli packages: (/usr/lib/node_modules)
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.7.0
System:
Android SDK Tools : 26.1.1
Node : v6.11.3
npm : 3.10.10
OS : Linux 4.10
Misc:
backend : pro
$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.17.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
$ javac -version
javac 1.8.0_131
Have you found the answer? I`m still stuck at the same place and cant seem to find the answer anywhere else
For me, I didn’t face the issue after I moved to Debian. Not sure what the actually caused the issue.