我有一个Kotlin代码:funshowAdWithCallback(callback:()->Unit){if(AdsPrefs.shouldShowInterstitialAd()){mInterstitialAd.show()this.callback=callback}else{callback()}}现在我想从Java类中调用此方法。我对如何调用它感到困惑。这是我试过的showAdWithCallback(()->{returnnull;});但它显示以下错误。 最佳答案 错误消息是由之前的代码引起的:showAdWith