Powered by Blogger.
  • Home
  • About
  • Contact
facebook instagram pinterest Email

chuckolet's Blog

Musician & Developer

Android emulator (AVD)에서 localhost access하는 방법

보통 PC에서 웹서버를 동작하게 하면, 웹 브라우져에서 "http://localhost:8080"로 접속 한다.

하지만 안드로이드 에뮬레이터에서는 "http://10.0.2.2:8080"로

접속을 해야 localhost에 접속이 가능하다.


안드로이드 에뮬레이터를 실행한 컴퓨터와 에뮬레이터의 OS가 다르다는 것을 인지하면

이해가 쉽다. 에뮬레이터에서 localhost의 의미는 그 가상 휴대폰을 지칭하는 것이기 때문에

PC에서의 localhost와는 다른 곳을 가르키게 되는 것이다.


에뮬레이터에서 테스트 할 경우에는 localhost가 아니라 PC의 특정 ip로 접속하고,

실제 휴대폰에서 테스트 할 경우에는 폰과 PC를 테더링으로 연결한 뒤 PC에 부여한

특정 ip로 접속하면 된다.




Ref 

쉽게 풀어쓴 IT 이야기
https://okky.kr/article/197254
Share
Tweet
Pin
Share
No comments
These are the exact steps you need to follow to solve the emulator issue:
  1. Change directory:
    $ cd ~/Android/Sdk/emulator/lib64/libstdc++  
    
  2. Create symbolic link to library:
    $ mv libstdc++.so.6 libstdc++.so.6.bak
    
  3. on the same directory:
    $ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6



참조 - https://askubuntu.com/questions/1031227/cant-run-avd-ubuntu-18-04

Share
Tweet
Pin
Share
No comments

Awesome Tutorial
https://www.simplifiedcoding.net/retrofit-android-tutorial/#Coding-SignUpActivity

Retrofit URL resolving concept ref
https://stackoverflow.com/questions/32431525/using-call-enqueue-function-in-retrofit

php ref
http://php.net/manual/kr/mysqli.prepare.php
Share
Tweet
Pin
Share
No comments




ref - https://stackoverflow.com/questions/32431525/using-call-enqueue-function-in-retrofit
Share
Tweet
Pin
Share
No comments
Older Posts

About Me

Unknown
View my complete profile

Categories

  • Android (4)
  • AWS (1)
  • Coding Test (3)
  • Computer (5)
  • etc (1)
  • Git (2)
  • JAVA (3)
  • Linux (6)
  • Machine Learning (7)
  • Music (1)
  • PHP (1)
  • Python (8)
  • React Native (1)
  • SQL (1)
  • Web (12)
  • XML (2)
  • 주식 (1)

Popular Posts

  • 아나콘다 파이썬에서 IDLE 실행하기
  • Solution: CUDA 9.0 설치 실패 오류 (CUDA 9.0 installer failed on windows 10)
  • 에어드로이드(Airdroid) 로컬 연결 모드 접속 방법(원격 연결 모드로만 접속 해결)
  • 우분투 16.04 크롬 설치, 블루 스크린 문제
  • 마우스 오른쪽 클릭으로 CMD 열기 (How do I right click command prompt?)

recent posts

Total Pageviews

Follow Me

  • facebook
  • instagram
  • Google+
  • youtube

Created with by ThemeXpose