1. 程式人生 > >collides with another import statement解決辦法

collides with another import statement解決辦法

style bak 報錯信息 event 刪除 clas 導入 ack statement

如我要導入的兩個包名為:

import com.tesla.gateway.core.filter.Filter
import ch.qos.logbak.core.filter.Filter

這樣就會看到報錯信息(意思就是兩個導入的名字沖突):

The import ch.qos.logbak.core.filter.Filter collides with another import statement

解決辦法一:

  把不需要的一個導入的包刪除即可。

解決辦法二:

  我確實需要導入這兩個包,只需要把其中的一個導包刪除,把這個導入的類或接口改成全路徑形式,如下這種形式即可。

import
com.tesla.gateway.core.filter.Filter public class ProxyFilter extends ch.qos.logback.core.filter.Filter<ILoggingEvent> implements Filter{ }

collides with another import statement解決辦法