Jetpack 撰写内部编译器参数警告

Paw*_*wel 15 android kotlin android-jetpack-compose

我使用 compose 1.0.1 和 Kotlin 1.5.20 创建了一个全新的 Android 应用程序,在编译过程中收到此警告:

w: ATTENTION!
This build uses unsafe internal compiler arguments:

-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
Run Code Online (Sandbox Code Playgroud)

您可以通过在 Android Studio Arctic Fox 2020.3.1 中创建一个全新的空 compose 活动项目并运行来重现它./assembleDebug。当添加 compose 时,它​​也会发生在任何其他 android studio 项目上

我应该担心这个警告吗?鉴于此警告,Compose 准备好投入生产了吗?

Ric*_*per 7

Compose 绝对已做好生产准备,这就是它现在在稳定渠道上推出的原因。至于警告的话,我想你不用担心。我在以前的版本中见过这个问题,最终得到了修复。它可能会再次发生,但我想既然如此internal,你对此无能为力。只要不妨碍你进一步发展就可以。寒意