尝试创建独立的Java应用程序,但无法进行身份验证。
import com.firebase.client.*;
public class Main {
public static void main(String[] args) {
Firebase ref = new Firebase("https://myURL.firebaseio.com/");
ref.authAnonymously(new Firebase.AuthResultHandler() {
@Override
public void onAuthenticationError(FirebaseError arg0) {
System.out.println("Not Authenticated: " + arg0);
}
@Override
public void onAuthenticated(AuthData arg0) {
System.out.println("Authenticated.");
}
});
}
}
始终忘记以下身份验证错误:
Not Authenticated: FirebaseError: There was an exception while connecting to the authentication server: Connection refused: connect
注意:
有什么建议吗?