@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// ...
final Balloon balloon = new Balloon.Builder(this).build();
balloon.setOnBalloonDismissListener(new OnBalloonDismissListener() {
@Override
public void onBalloonDismiss() {
}
});
}
Build the project, and observe the compilation error:
... MainActivity.java:24: error: cannot access Function0
balloon.setOnBalloonDismissListener(new OnBalloonDismissListener() {
^
class file for kotlin.jvm.functions.Function0 not found
In
Android Studio 4.0.1
, create a new Java project. Then modify it as follows.build.gradle
MainActivity.java
Build the project, and observe the compilation error:
What am I missing here?