我使用 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!
您可以通过在 Android Studio 北极狐 2020.3.1 中创建一个全新的空撰写 Activity 项目并运行 ./assembleDebug
来重现它。 .添加 compose 时,它也会发生在任何其他 android studio 项目中我应该担心这个警告吗?鉴于此警告,Compose 准备好投入生产了吗?
最佳答案
Compose 绝对可以生产,这就是它现在在稳定 channel 上推出的原因。就警告而言,我认为您不必担心。我在以前的版本中看到过这个问题,最终得到了修复。它可能会再次发生,但我想因为它是 internal
,您对此无能为力。只要不妨碍你进一步发展,没关系。寒意
关于android - Jetpack 撰写内部编译器参数警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68671404/