简体   繁体   English

Android:将图像从URL下载到Assets文件夹

[英]Android: download image from URL to Assets folder

I have a method that downloads an image from a given URL. 我有一个从给定的URL下载图像的方法。 Is it posible to store the downloaded image in the Assets folder and then reference it at runtime? 是否可以将下载的图像存储在Assets文件夹中,然后在运行时引用它?

Thanks in advance! 提前致谢!

No. The asset folder is not listed as a storage option . 不可以。资产文件夹未列为存储选项 You need to use the internal storage or external storage API's to store your image. 您需要使用内部存储或外部存储API来存储图像。

您的设备上没有资源文件夹,您可以使用正确的Android权限将图像保存到SD卡上的自己的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM