Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个代码,让我以编程方式将文件从我的资源文件夹之一切换到我的资产文件夹。我已经尝试过file.renameTo过去对我非常有效的常用方法....但是对于android它似乎什么也没做...
file.renameTo
assets 和 res 文件夹是 .apk 文件结构的一部分。这不是手机上的应用程序可以更改的。您可以在手机的文件系统中创建文件夹结构,但这需要通过文件访问 api 从您的应用程序访问,而不是作为资产或资源标识符。