-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
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
在lib中R取值问题 #28
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@page在app模块中不存在问题,如果在lib中使用,由于生成的R是静态变量,不能直接使用,参考butterknife中的R2复制一份R.
但只能保证在该模块中相同,与app中的并不一定相同,这里我借鉴了butterKnife 中的方法,通过jct来替换R.
然后通过该方法拿到R
最后在创建的时候替换即可:
暂时只找到这一中方法,如有更好的方法,请作者大大分享一下。
The text was updated successfully, but these errors were encountered: