https://kotlinlang.org logo
#compose
Title
# compose
b

Bryan Lee

12/31/2019, 11:38 PM
Anyone know what this error means? I believe it happens when I try to override onDestroyView() in a Fragment. java.lang.NoSuchMethodError: No virtual method _$_clearFindViewByIdCache()V in class Lcom/../MyFragment; or its super classes (declaration of 'com...MyFragment' appears in /data/app/com.example.composesample-1/base.apk:classes2.dex) at com.example.composesample.ui.util.MyFragment.onDestroyView(MyFragment.kt:28) If I change it to something like onDestroy(), there are no problems.
a

Adam Powell

12/31/2019, 11:52 PM
Try disabling the kotlin-android plugin that generates the synthetic view methods in that module
iirc the method name it's citing comes from that
b

Bryan Lee

01/01/2020, 12:03 AM
Disabling/removing
Copy code
apply plugin: 'kotlin-android-extensions'
did the trick. Thanks again!
👍 1
k

Kashif

01/01/2020, 8:01 AM
2 Views