在动态模块下无法访问资产文件
我正在使用Android应用程序。 到目前为止,我的资产上有一些文件,
context.getAssets().open(fileName)
现在我可以使用这些文件将动态按需模块与某些应用程序功能集成在一起。我将一些资产文件从应用程序模块移到了动态模块资产文件夹中,因为仅具有动态功能才需要这些文件夹。 使用splitInstallManager
下载按需模块后,所有功能都在工作 但是我没有使用上述代码获取资产文件。
我们是否需要访问App模块的相同方式的资产。还是其他按需模块还有其他选择?
当我分析Android Studio的AAB文件时,我会看到And Demand模块中包含资产文件夹和文件。我正在使用Google Play的内部应用共享测试。
感谢提前的帮助。
I am working with android applications.
So far I had some files on my assets which I was able to access using
context.getAssets().open(fileName)
Now I am trying to integrate a dynamic on demand module with some of app features. And I moved some of my assets file from app module to dynamic module asset folder as those are only needed with dynamic features.
All the features are working after downloading on demand module using SplitInstallManager
But I am not getting the asset file using above code.
Do we need to access the assets same way for app module. Or there is other option for on demand module?
When I analyze the aab file from android studio, I see that assets folder and files are included with on demand module. I am testing by using internal app sharing of google play.
Thanks for help in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论