You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I clone the project and when I run it on my device, app crashed in a few activities. the issue is related to string conversion to float.
As you see below value from Random.nextDouble(1.0, maxRange.toDouble()) is 48.088231731515215 but formating will cause to change point (.) to comma (,). this could be related to device language because we use comma for decimals in Turkish. val barValue = "%.2f".format(Random.nextDouble(1.0, maxRange.toDouble())).toFloat()
getGroupBarChartData: 48.088231731515215 2023-08-21 00:34:23.560 10199-10199 AndroidRuntime co.yml.ycharts.app D Shutting down VM 2023-08-21 00:34:23.561 10199-10199 AndroidRuntime co.yml.ycharts.app E FATAL EXCEPTION: main Process: co.yml.ycharts.app, PID: 10199 java.lang.NumberFormatException: For input string: "48,09" at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.lang.Float.parseFloat(Float.java:455) at co.yml.charts.common.utils.DataUtils.getGroupBarChartData(DataUtils.kt:341) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivityKt.BarWithLineChart(CombinedLineAndBarChartActivity.kt:104) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivity$onCreate$1$1$2$1$1$1$1.invoke(CombinedLineAndBarChartActivity.kt:76) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivity$onCreate$1$1$2$1$1$1$1.invoke(CombinedLineAndBarChartActivity.kt:67) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:135)
The text was updated successfully, but these errors were encountered:
I clone the project and when I run it on my device, app crashed in a few activities. the issue is related to string conversion to float.
As you see below value from
Random.nextDouble(1.0, maxRange.toDouble())
is 48.088231731515215 but formating will cause to change point (.) to comma (,). this could be related to device language because we use comma for decimals in Turkish.val barValue = "%.2f".format(Random.nextDouble(1.0, maxRange.toDouble())).toFloat()
getGroupBarChartData: 48.088231731515215 2023-08-21 00:34:23.560 10199-10199 AndroidRuntime co.yml.ycharts.app D Shutting down VM 2023-08-21 00:34:23.561 10199-10199 AndroidRuntime co.yml.ycharts.app E FATAL EXCEPTION: main Process: co.yml.ycharts.app, PID: 10199 java.lang.NumberFormatException: For input string: "48,09" at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.lang.Float.parseFloat(Float.java:455) at co.yml.charts.common.utils.DataUtils.getGroupBarChartData(DataUtils.kt:341) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivityKt.BarWithLineChart(CombinedLineAndBarChartActivity.kt:104) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivity$onCreate$1$1$2$1$1$1$1.invoke(CombinedLineAndBarChartActivity.kt:76) at co.yml.ycharts.app.presentation.CombinedLineAndBarChartActivity$onCreate$1$1$2$1$1$1$1.invoke(CombinedLineAndBarChartActivity.kt:67) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:135)
The text was updated successfully, but these errors were encountered: