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.
我正在尝试在我的 Android 应用程序中使用第三方库,它只允许我使用代表文件路径的字符串加载文件。我已将此文件放在我的应用程序的资产文件夹中,认为我可以使用 AssetManager 将其路径作为字符串获取。但是,它只返回文件的相对路径。所以我想知道是否有某种方法可以获取文件的完整路径,以便该库可以成功加载文件。
只是一个猜测 -Resources.getResourceName()做的伎俩?
Resources.getResourceName()