网络图像未显示在Android颤动中
我正在研究一个搜索Android的flutter应用程序的食谱。我正在使用 edamam api 。我现在还在使用用户的虚拟图像(因为到目前为止,我尚未将应用程序连接到Firebase)。这些图像已加载在Android模拟器中,但是当我在实际手机上运行该应用时,它不会加载任何照片。请看看我的问题。
这是用于加载API图像的代码。
image: DecorationImage(
image:
NetworkImage(query["hits"][index]["recipe"]["image"]),
I am working on a recipe searching flutter app for android. I am using Edamam API. I am also using a dummy image of the user for now (because I haven't connected my application with Firebase so far). The images are loaded in the android emulator, but it doesn't load any photos when I run the app on my actual phone. Please have a look at my problem.
Emulator's Screenshot:
Actual Phone's Screenshot:
This is the code for loading images from API.
image: DecorationImage(
image:
NetworkImage(query["hits"][index]["recipe"]["image"]),
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
打开位于./android/app/src/main的AndroidManifest.xml文件,
我想您没有在Menifest.xml中添加Internet许可
Open the AndroidManifest.xml file located at ./android/app/src/main
i guess you didn't add internet permission in you menifest.xml
我猜,由于已更改或从服务器删除的路径更改或删除图像值接收
null
,因此服务器上的任何一个图像都不可用。我很多次面对类似的问题。
请检查一次。
谢谢
I guess either image is not available on the server due to path changed or deleted from server else image value receive
null
.I faced similar issue many times.
please check once.
thanks