Closed lengyue524 closed 7 years ago
I change retrolambda to 3.2.5 the error changed:
Process: com.lengyue.mobilerush, PID: 25492
java.lang.IncompatibleClassChangeError: The method 'void com.lengyue.mi.MiSettingActivity.com_lengyue_mi_MiSettingActivity_lambda$setlistener$2(android.view.View)' was expected to be of type direct but instead was found to be of type virtual (declaration of 'com.lengyue.mi.MiSettingActivity' appears in /data/app/com.lengyue.mobilerush-1/base.apk)
at com.lengyue.mi.MiSettingActivity.access$lambda$0(MiSettingActivity.java)
at com.lengyue.mi.MiSettingActivity$$Lambda$1.onClick(Unknown Source)
at android.view.View.performClick(View.java:5264)
at android.view.View$PerformClick.run(View.java:21297)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5546)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
You should apply retrolambda plugin directly in your library's build.gradle file. Otherwise it won't work.
@Archinamon I have apply the plugin in my library's build.gradle
@lengyue524 Would you share how did you resolve this issue? Thanks!
My project have app and library. Code in app can use Lambda. library can write code in Lambda but when I run the app it crash with follow errow.
looks like Lambda did generate class.
how to fix it?
project build.gradle:
app build.gradle:
library build.gradle: