Hello, I want to migrate a Java library into a KMP...
# multiplatform
x
Hello, I want to migrate a Java library into a KMP library. A key step is to first convert *.java to *.kt. I tried using Android Studio's "Code | Convert Java File to Kotlin File", but the converted Kotlin files have many compilation errors, mainly null safety issues. For example, the converted class properties are nullable types, but the calling places do not add "?." or "!!". Are there any good solutions?
m
The conversion process is meant to help you, not replace you. You have to correct the files afterwards. If you are in such a hurry, try asking a chatbot to correct that code
👍 2
h
Add proper nullable annotations, like JetBrains annotations