我正在使用EventSource REPO https://github.com/streamdataio/eventsource-android/ 我創建了一個onConnect();方法,但是,eventsource.connect();方法是加下劃線的紅色,並說我無法訪問它,因爲它是私人的?我在網上看,每個人都使用這個REPO,沒有任何問題在這裏發生了什麼?使用Git執行Android EventSource REPO https://github.com/streamdataio/eventsource-android/ private onConnect錯誤
private void connect() {
// Create headers: Add the streamdata.io app token
Map<String, String> headers = new HashMap<String, String>();
headers.put("X-Sd-Token", streamdataioAppToken);
// Create the EventSource with API URL & Streamdata.io authentication token
try {
eventSource = new EventSource(new URI(streamdataioProxyPrefix), new URI(myApiUrl), new SSEHandler(), headers);
} catch (URISyntaxException e) {
e.printStackTrace();
}
// Start data receiving
eventSource.connect();
}
你好,我想知道這可能是添加REPO時的錯誤。我遵循這個過程,我克隆了REPO,assembleRelease,構建了APK,然後將它作爲模塊添加到我的android studio項目中,並將其作爲編譯依賴項添加到我的應用程序中。這是正確的程序嗎? – eli
你們也有公司號碼嗎? – eli
雅它看起來像它不承認我的進口org.jboss.netty.channel.ChannelFuture連接 – eli