voize-gmbh/reakt-native-toolkit

Got Float16 error when building android example

truongnguyen3 opened this issue · 4 comments

Steps to reproduce

  1. Clone project, run command yarn install in example folder
  2. Run "yarn android"

Error:

_Float16 is not supported on this target at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:275) at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1246) at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1229) at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1225) at org.jetbrains.kotlin.native.interop.gen.jvm.DefaultPlugin.buildNativeIndex(Plugins.kt:33) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:311) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLibSafe(main.kt:243) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.access$processCLibSafe(main.kt:1) at org.jetbrains.kotlin.native.interop.gen.jvm.Interop.interop(main.kt:101) at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:47) at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:23) at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:45) FAILURE: Build failed with an exception.

Idk how to workaround with this issue

You are probably using XCode 16 which is only supported in Kotlin 2.0.21 which came out a couple of days ago. The example project uses Kotlin 1.9.23.
Either downgrade XCode, update the Kotlin version in the example project or wait until we upgrade it.

See: https://youtrack.jetbrains.com/issue/KT-69094/LLVM-11-clang-cinterops-fail-with-Float16-is-not-supported-on-this-target

I tried this guideline https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html#migrating-a-jetpack-compose-project but still encountered errors.

I will wait for the example app to be updated.

I encountered the issue 'shared/shared.h' file not found when running iOS and will wait for the example app to be updated as well.

The toolkit and example project has been updated to run with Kotlin 2.0.21 and should now work with XCode 16.