[Solved] Flink Error: Cannot resolve method addSource

The error report is inexplicable, but in fact, the dependency package imported by idea has multiple options, and it is wrong.

The required dependencies are as follows:

import org.apache.flink.api.common.serialization.SimpleStringSchema;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer;

import java.util.Collections;
import java.util.List;
import java.util.Properties;


Read More: