无法使用LAN中的Android设备应用程序访问在Android Studio中运行的App Engine应用程序

Awe*_*ome 6 google-app-engine android android-studio

  1. 我在Android Studio中运行Google App Engine应用程序.
  2. 从同一Android Studio将Android应用程序安装到我的Android设备.
  3. GAE应用程序build.gradle中的appengine任务配置如下:

    appengine {
        downloadSdk = true
        jvmFlags = ["-Ddatastore.backing_store=$localDbPath"]
        httpPort = 8888
        httpAddress = "0.0.0.0"
    }
    
    Run Code Online (Sandbox Code Playgroud)
  4. 在同一LAN连接中连接两台设备("笔记本电脑 - 运行Android Studio"和"运行Android应用程序的移动设备").

  5. 我的Android应用程序向在Android Studio上运行的AppEngine应用程序发出请求.
  6. 由于上面的调用我得到"连接超时"错误.
  7. 如果在Eclipse中运行App Engine应用程序而不是Android Studio,则Android设备应用程序能够成功连接到GAE应用程序.
  8. 我尝试的另一件事是在httpAddress中配置笔记本电脑IP地址***.***.*.*.仍然收到连接超时错误.

Android Studio中缺少哪些设置?

sug*_*oft 5

我在Android Studio中运行时遇到了同样的连接超时错误,但在Eclipse中却没有发生。

以下是我为克服此类问题而遵循的解决方案

解决方案1:

在模拟器而非移动物理设备中运行您的Android Studio应用

这将减少连接超时错误

解决方案2:

Android Manifest文件Internet权限更新并与本地Internet Wifi连接

解决方案3:

Check your gradle version and its followed the below in Android Studio,    
 [https://cloud.google.com/appengine/docs/flexible/java/using-gradle][1]

Check your environment by satisfying the google norms 
 [https://cloud.google.com/appengine/docs/the-appengine-environments][1]
Run Code Online (Sandbox Code Playgroud)