Search code examples
androidgoogle-app-enginegoogle-cloud-endpoints

what should be the address when running the appengine on localhost using android device and "Not Emulator"


MyApi.Builder builder = new MyApi.Builder(AndroidHttp.newCompatibleTransport(), new AndroidJsonFactory(), null)

.setRootUrl("http://10.0.2.2:8080/_ah/api/")


Solution

  • You need to use the internal ip address of the machine which is running the appengine server and you have to put the following line to your gradle build file of your appengine project

    appengine {
     .....
     httpAddress = '0.0.0.0'
     ......
    }