Lamdba in the studio part reports an error. Observe lamdba reports an error but can run

Question:

Ordinary lamdba can be used, such as view. Setonclicklistener {}

Some lamdbas are popular but can run, such as livedata. Observe() {}

solve:

It’s not because the Java version is backward. I updated the kotlin plug-in to solve this problem

Studio even pops up a warning pop-up window of “plug-in needs to be updated” in the lower right corner, but I ignore it everyday… Try to update the Java version and still can’t solve it before you notice it

Read More: