We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
友盟分享库在宿主中,插件使用友盟分享时 友盟库会调用getIdentifier方法,传入的是宿主的包名,找不到资源Id(代码已经查看是最新)
在PluginResourceWrapper --> getIdentifier断点调试
将return super.getIdentifier(entry, type, packageName); 替换为return superGetIdentifier(entry, type, packageName);
private int superGetIdentifier(String name, String type, String packageName) { int id = super.getIdentifier(name, type, packageName); if (id <= 0) {//找不到资源 //切换包名,继续查找资源 if (PluginLoader.getApplicatoin().getPackageName().equals(packageName)) { packageName = mPluginDescriptor.getPackageName(); } else { packageName = PluginLoader.getApplicatoin().getPackageName(); } id = super.getIdentifier(name, type, packageName); } return id; }
目前这个方案能解决现有的问题,但是不知道是否会引起其他问题。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
场景描述
友盟分享库在宿主中,插件使用友盟分享时 友盟库会调用getIdentifier方法,传入的是宿主的包名,找不到资源Id(代码已经查看是最新)
调试
在PluginResourceWrapper --> getIdentifier断点调试
目前我的临时解决方案为
将return super.getIdentifier(entry, type, packageName);
替换为return superGetIdentifier(entry, type, packageName);
目前这个方案能解决现有的问题,但是不知道是否会引起其他问题。
The text was updated successfully, but these errors were encountered: