I've not found any examples of how to get the [url=http://site.icu-
project.org/]icu4j library[/url] working with Android. Actually, I'm
only interested in the calendaring portion. I'm trying to use ICU4J
version 4.2.1.

I'm trying to run the following code:
[syntax="java"]
  hebrewCalendar = com.ibm.icu.util.Calendar.getInstance( new ULocale
( "en...@calendar=hebrew" ) );
  hebrewDateFormatter = com.ibm.icu.text.DateFormat.getDateInstance
( com.ibm.icu.text.DateFormat.LONG );
[/syntax]

When I do, I get the following error:
[quote]
        Caused by: java.util.MissingResourceException: Could not find
res_index
        at com.ibm.icu.impl.ICUResourceBundle.createFullLocaleNameSet
(ICUResourceBundle.java:568)
        at com.ibm.icu.impl.ICUResourceBundle.access$300
(ICUResourceBundle.java:36)
        at com.ibm.icu.impl.ICUResourceBundle
$AvailEntry.getFullLocaleNameSet(ICUResourceBundle.java:625)
        at com.ibm.icu.impl.ICUResourceBundle.getFullLocaleNameSet
(ICUResourceBundle.java:384)
        at com.ibm.icu.impl.ICULocaleService
$ICUResourceBundleFactory.getSupportedIDs(ICULocaleService.java:557)
        at com.ibm.icu.impl.ICULocaleService
$LocaleKeyFactory.handlesKey(ICULocaleService.java:389)
        at com.ibm.icu.impl.ICULocaleService$LocaleKeyFactory.create
(ICULocaleService.java:373)
        at com.ibm.icu.impl.ICUService.getKey(ICUService.java:460)
        at com.ibm.icu.impl.ICUService.getKey(ICUService.java:380)
        at com.ibm.icu.impl.ICULocaleService.get(ICULocaleService.java:
72)
        at com.ibm.icu.impl.ICULocaleService.get(ICULocaleService.java:
56)
        at com.ibm.icu.util.CalendarServiceShim.createInstance
(CalendarServiceShim.java:67)
        at com.ibm.icu.util.Calendar.getInstanceInternal(Calendar.java:
1634)
        at com.ibm.icu.util.Calendar.getInstance(Calendar.java:1596)
[/quote]

I've confirmed that the icu4j.jar file does in fact have the res_index
file:
[quote]
    5872  Defl:N     2099  64%  06-26-09 12:07  04bd7c44  com/ibm/icu/
impl/data/icudt42b/res_index.res
[/quote]

As far as I can tell, it's almost as if the JAR file isn't in the
classpath, but clearly it is, because the com.ibm.icu... classes are
all found.

I've not found anything about anyone having similar issues, so either
this is something stupid I'm doing, or else no one else has had to
overcome this problem (yet).

Thanks for any help,

jay

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to