On Sun, Aug 9, 2009 at 7:51 AM, amiz <aarn...@gmail.com> wrote:
> I have an app (SDK 1.1)  that uses
>
>  dataOut_str = String.format("%.2f" ,dataOut_d);
>
> which converts correctly double (dataOut_d) into a string with 2
> decimals.
>
> With 1.5, I get a runtime exception:
>
> 08-09 17:36:45.717: ERROR/AndroidRuntime(944): Uncaught handler:
> thread main exiting due to uncaught exception
> 08-09 17:36:45.727: ERROR/AndroidRuntime(944):
> java.util.IllegalFormatConversionException: f is incompatible with
> java.lang.String
> 08-09 17:36:45.727: ERROR/AndroidRuntime(944):     at
> java.util.Formatter$Transformer.transformFromFloat(Formatter.java:
> 1919)
>
> Instead I use dataOut_str = Double.toString(dataOut_d);
> and have to add additional code to display only 2 decimals.
>
> 1. Has anything changed between 1.1 and 1.5?

Possibly. If this is sufficiently important to you, please put
together a compilable-and-runnable test to demonstrate the problem,
and submit it in a new bug.

Thanks!

-dan

--~--~---------~--~----~------------~-------~--~----~
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