I built a KMP project. In the desktop module this ...
# multiplatform
a
I built a KMP project. In the desktop module this is how I saved some text to a log file-
Copy code
actual fun save(entry: String, packageName: String) {
            val pathName = File("logs")
            pathName.mkdirs()
            val fileName = packageName.replace(".", "_")
            val file = File(pathName, "${fileName}.txt")
            val fileWriter = FileWriter(file, true) // Append mode
            fileWriter.write("$entry\n") // Append data with a newline
            fileWriter.close()
        }
It worked perfectly when I run the desktop application in intellj idea, but when I built native OS distribution and try to run the application, it gives me this error- Also, how can I set an icon for the distribution application?