Closed marcoRS closed 10 years ago
There were 3 errors on your code and another one in SwissKnife which made it crash:
SwissKnife.inject(this, getView());
in onCreateView()
, where it is still null. You should do it later, on onViewCreated()
or in onActivityCreated()
. Or even pass the inflated view itself.@OnItemClick(R.layout.fragment_navigation_drawer)
. Annotations accept only ids, not layouts. It should be @OnItemClick(R.id.navigation_drawer)
.@CompileStatic
, you should enforce it with @CompileStatic(TypeCheckingMode.SKIP)
so it doesn't do type checking. That's what was causing the error you showed above.Also, SwissKnife has another bug that would prevent it form working as it would try to use findViewById()
on the Fragment itself and not on the provided view, and I still have to fix it. A new 1.0.2 version will be out tomorrow ASAP.
Thank you for submitting this!
Should be fixed in 70dd67740ad8959489ff608f13ec878df664b3f9.
You won't need to add the TypeCheckingMethod.SKIP
stuff, I already fixed it, but you will need to fix the other 2 errors I mentioned before. I have used your app as testing and it should work, but please confirm me that everything is ok so I can close this issue :+1: .
:+1: Works great after upgrading to v1.0.2. Thanks
I included swissknife in one of my sample projects. When I try to build from terminal using ```gradle installDebug" I get error below. You can reproduce my test set up by using this branch: https://github.com/marcoRS/groovy-android/tree/swissknife-test