JakeWharton / u2020

A sample Android app which showcases advanced usage of Dagger among other open source libraries.
https://www.youtube.com/watch?v=0XHx9jtxIxU
Apache License 2.0
5.68k stars 929 forks source link

Error:(135, 54) error: Attempt to use @InjectView for an already injected ID 2131099650 on 'content'. (com.jakewharton.u2020.ui.debug.DebugAppContainer.scalpelFrameLayout) #46

Closed Aexyn closed 9 years ago

Aexyn commented 10 years ago

The app works well, but on upgrading butterknife to 6.0.0 , it throws this runtime error

JakeWharton commented 10 years ago

The error tells you the problem. Just inject it once.

Aexyn commented 10 years ago

@InjectView(R.id.debug_drawer_layout) DrawerLayout drawerLayout; @InjectView(R.id.debug_content) ViewGroup content;

@InjectView(R.id.madge_container) MadgeFrameLayout madgeFrameLayout; @InjectView(R.id.debug_content) ScalpelFrameLayout scalpelFrameLayout;

@InjectView(R.id.debug_contextual_title) View contextualTitleView; @InjectView(R.id.debug_contextual_list) LinearLayout contextualListView; .....

With due respet, this is the code I get in "DebugAppContainer.java" on line 130 and 133, and upon updating to 6.0.0, I got that error.

The file I am referring is this one https://github.com/JakeWharton/u2020/blob/master/src/debug/java/com/jakewharton/u2020/ui/debug/DebugAppContainer.java

JakeWharton commented 10 years ago

Yeah I understand. I'm saying if you are updating Butter Knife then you also need to fix it. I'll get around to updating this repo eventually but for now there's no harm on leaving it on version 5.

Aexyn commented 10 years ago

Sure. I am already back to 4.0.1 . Just reporting the issue :)

JakeWharton commented 10 years ago

Cool, thanks. I have updating libraries on my "to do" list but it's behind some other things.

Aexyn commented 10 years ago

Thank you for being Awesome dev :+1: :ok_hand:

JakeWharton commented 9 years ago

This is done.