为Android构建时的错误消息:
error: cannot access ConnectionEventListener
flutterEngine.getPlugins().add(new com.pusher.channels_flutter.PusherChannelsFlutterPlugin());
^
class file for com.pusher.client.connection.ConnectionEventListener not found
如前所述,在应用程序级build.gradle文件中添加pusher java客户端依赖性解决了这个问题。
dependencies {
...
implementation 'com.pusher:pusher-java-client:2.2.8'
}
添加到:
your_project_folder/android/app/build.gradle