钟良堂 2021-10-13 00:03 采纳率: 42.9%
浏览 212
已结题

在Android上部署TensorFlowLite报错(官方的TensorFlowLite demo)

最近在Android Studio上面部署TensorFlowLite demo,使用的是这个教程:

https://www.jianshu.com/p/50f5c7d32575

我已经Gradle Files成功了:

img

img

但是点击运行的时候,要下载这些文件,却报了这个错误:

下载的时候:

img

我用了翻墙上网还是不能下载,还是会报这个错误:

Connection timed out: connect.If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

具体报错信息如下:

> Task :app:downloadModelFile
Download https://tfhub.dev/tensorflow/lite-model/ssd_mobilenet_v1/1/metadata/2?lite-format=tflite

> Task :app:downloadModelFile FAILED
Execution failed for task ':app:downloadModelFile'.
> de.undercouch.gradle.tasks.download.org.apache.http.conn.HttpHostConnectException: Connect to tfhub.dev:443 [tfhub.dev/142.251.42.238] failed: Connection timed out: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

img

Execution failed for task ':app:downloadModelFile'.
> de.undercouch.gradle.tasks.download.org.apache.http.conn.HttpHostConnectException: Connect to tfhub.dev:443 [tfhub.dev/142.251.42.238] failed: Connection timed out: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

img

感觉这个太难受了,只是一个官方dome,我都部署那么久,希望有做出来的同学可以帮我看看,谢谢!

  • 写回答

1条回答 默认 最新

  • IT人.阿标 移动开发领域优质创作者 2021-10-13 08:05
    关注

    你开墙只是电脑开墙吧? 是不是没有另外设置android studio的代理或者设置Gradle的代理,没设置的话还是访问不通的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月21日
  • 已采纳回答 10月13日
  • 修改了问题 10月13日
  • 修改了问题 10月13日
  • 展开全部

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 MATLAB动图问题
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名