LoginSignup
1
0

AppwriteにFlutterプロジェクトからAndroidエミュレータで接続する時の接続エラー

Last updated at Posted at 2024-03-04

AppwriteにFlutterから接続する時、Androidエミュレータのときのみなぜか繋がらない問題が起きました。
(*dockerでローカルでAppwriteを起動しています。)

下記がエラー
ClientException with SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 33098,

エミュレータをAndroid Studioから削除→再構築
など試してみましたがうまくいかず、

youtubeで検索してたところなぜかこの方法で解決。

Appwriteに接続する時の接続先を

endPoint = 'http://10.0.2.2/v1';

のように、「10.0.2.2」にします。

こうするとうまくいきました。(なんで?)

参考Youtube動画

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0