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

[speech to text] Android: java.lang.IllegalArgumentException: Unknown pattern character 'X' when instantiating the service #681

Closed
DavidHormigo opened this issue Apr 29, 2017 · 5 comments · Fixed by #691
Assignees
Labels

Comments

@DavidHormigo
Copy link
Contributor

DavidHormigo commented Apr 29, 2017

Hi,

I found a bug when using the Speech to text service on Android (I know that was already reported on #76 and #677):

Caused by java.lang.IllegalArgumentException: Unknown pattern character 'X'
java.text.SimpleDateFormat.validatePatternCharacter (SimpleDateFormat.java:323)
java.text.SimpleDateFormat.validatePattern (SimpleDateFormat.java:312)
java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:365)
java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:258)
com.ibm.watson.developer_cloud.util.DateDeserializer.<init> (DateDeserializer.java:52)
com.ibm.watson.developer_cloud.util.GsonSingleton.registerTypeAdapters (GsonSingleton.java:53)
com.ibm.watson.developer_cloud.util.GsonSingleton.createGson (GsonSingleton.java:42)
com.ibm.watson.developer_cloud.util.GsonSingleton.getGsonWithoutPrettyPrinting (GsonSingleton.java:76)
com.ibm.watson.developer_cloud.speech_to_text.v1.SpeechToText.<clinit> (SpeechToText.java:119)
innvaria.com.watson.view.HomeActivity$3.onClick (HomeActivity.java:87)
android.view.View.performClick (View.java:5265)
android.view.View$PerformClick.run (View.java:21534)
android.os.Handler.handleCallback (Handler.java:815)
android.os.Handler.dispatchMessage (Handler.java:104)
android.os.Looper.loop (Looper.java:207)
android.app.ActivityThread.main (ActivityThread.java:5683)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)

I'm using Android 6.0 (Android API 21) and using JDK 1.7

image

@DavidHormigo DavidHormigo changed the title Speech to text on android: java.lang.IllegalArgumentException: Unknown pattern character 'X' [speech to text] Android: java.lang.IllegalArgumentException: Unknown pattern character 'X' when instantiating the service Apr 29, 2017
@markwinap
Copy link

markwinap commented May 9, 2017

im also having the same issue will building for android sdk 22. I hope this issue is resolved soon but im having this issue with the ConversationService

@germanattanasio
Copy link
Contributor

I'm on it. Give me a few hours

@germanattanasio
Copy link
Contributor

@DavidHormigo Once I merge #691 it will be in sonatype snapshots.
Check the readme for instructions on how to use the snapshot repository. It will be great if you can validate that this issue was fixed

@DavidHormigo
Copy link
Contributor Author

Hi @germanattanasio , there's no reference on readme on how to use snapshots. I figured it out and you have to add to your gradle file the repository
allprojects {
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}

And in your dependecies change the version to point to the snapshot, in speech to text case:
compile('com.ibm.watson.developer_cloud:speech-to-text:3.8.1-SNAPSHOT')

After changing this the bug is fixed.

Thanks !

@shekharsaini
Copy link

shekharsaini commented May 23, 2017

Thanx buddy It works.......#Atul

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

Successfully merging a pull request may close this issue.

4 participants