kotlin.reflect.jvm.internal.kotlinreflectioninternalerror时,当降低时

发布于 2025-02-13 01:27:14 字数 252 浏览 0 评论 0 原文

我有问题。 当我的应用程序MinifyEnabled为True时,它崩溃了!错误如下:

kotlin.reflect.jvm.internal.KotlinReflectionInternalError: This callable does not support a default call: public constructor LoginResultBean

我认为必须与Moshi和R8有一些关系。我需要帮助...

I get a problem.
when my app minifyenabled is true , it crashed ! and the error is following:

kotlin.reflect.jvm.internal.KotlinReflectionInternalError: This callable does not support a default call: public constructor LoginResultBean

I think there must be some relationships with moshi and R8. I need help...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2025-02-20 01:27:14

希望这会有所帮助。

Hope this can help.

  • Solution 1: Use the @Keep annotation for your class. Use this when you have many classes like the one having error and they are defined in different packages, which make it difficult to define the rules in proguard file.
  • Solution 2: you can define rules in the proguard file if they are in the same package (so that you don't have to define many rules). For example -keep class yourpackage.** { *; }. More about the keep option.
将军与妓 2025-02-20 01:27:14

由于这似乎是由反思代码引起的,因此您可能需要更多的程序保留规则。请参阅 https://develoveling.com/stroid.com/studio/studio/build/build/build/shrink-code 有关更多信息。

As this seems to be caused by reflective code, you might need more keep rules for your program. See https://developer.android.com/studio/build/shrink-code for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文