-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Library project issue #45
Comments
Ok, finally found this: #2 |
There's simply no way to support this without compromising the safety of referring to the IDs as fields. |
Any chance a way around this can be found? Using names instead of ids? I am building a Library project with acitivities and fragments, using ButterKnife, to be included in multiple main .apk's, but I'm also faced with the non final id problem :/ |
Using names is not compile- nor rename-safe, though. |
Not being able to use Butterknife seems to be worse? ;) |
Does this help, AndroidAnnotations has compile time checking: https://github.com/excilys/androidannotations/wiki/Library-projects RoboGuice took the "name" approach, using tags: https://code.google.com/p/roboguice/wiki/LibraryProjects |
It's not a technical problem (aside from the obvious lack of |
I understand. Guess I'll have to learn one of those other 2 frameworks now :( Refactoring time ;) |
Are there any plans to add library support to Butterknife in the future? |
Highly unlikely. It compromises its greatest asset. Jake Wharton On Thu, Jan 30, 2014 at 2:19 PM, Bryan Perez [email protected]:
|
Butterknife is currently incompatible with library use and highly unlikely to change since it compromises security. See JakeWharton/butterknife#45 for additional details. Closes #18
has this been resolved yet? |
No. And it probably never will be. On Wed, Apr 15, 2015, 10:40 AM jonneymendoza [email protected]
|
It can now be used in a library....view the readme |
Hi,
I have 4 project.
common
model
service
view
view only see service, service only see model, all of these see common.
I put butterknife lib to common, set the annotations processing. In the view project i can use annotations, but eclipse say for @InjectView value: "The value for annotation attribute InjectView.value must be a constant expression"
@InjectView(R.id.toastviewcontainer)
ToastContainerView toastContainerView;
The .aptgenerated folder created and contains this:
"public class MainActivity$$ViewInjector {
public static void inject(Finder finder, hbogo.view.activity.MainActivity target, Object source) {
View view;
view = finder.findById(source, 0);
target.toastContainerView = (hbogo.view.toast.ToastContainerView) view;
}
public static void reset(hbogo.view.activity.MainActivity target) {
target.toastContainerView = null;
}
}"
How can I correctly use butterknife in library projects?
Sry my bad english ;)
The text was updated successfully, but these errors were encountered: