{"action":"created","issue":{"url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/18","labels_url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/18/comments","events_url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/18/events","html_url":"https://github.com/Arasthel/SwissKnife/issues/18","id":68861199,"number":18,"title":"SwissKnife not working  in Activity (except MainActivity)","user":{"login":"newjing","id":2892878,"avatar_url":"https://avatars.githubusercontent.com/u/2892878?v=3","gravatar_id":"","url":"https://api.github.com/users/newjing","html_url":"https://github.com/newjing","followers_url":"https://api.github.com/users/newjing/followers","following_url":"https://api.github.com/users/newjing/following{/other_user}","gists_url":"https://api.github.com/users/newjing/gists{/gist_id}","starred_url":"https://api.github.com/users/newjing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newjing/subscriptions","organizations_url":"https://api.github.com/users/newjing/orgs","repos_url":"https://api.github.com/users/newjing/repos","events_url":"https://api.github.com/users/newjing/events{/privacy}","received_events_url":"https://api.github.com/users/newjing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-16T07:12:01Z","updated_at":"2015-04-20T17:07:13Z","closed_at":null,"body":"I've been using SwissKnife with MainActivity, and everything is working fine. \r\n\r\nHowever, when I create a second Activity, swissknife cannot work.\r\n\r\nMy second activity code as below    (With a Button \"testBtn\" in layout)\r\n\r\n\r\n```\r\npublic class KFLoginActivity extends ActionBarActivity {\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_kflogin);\r\n\r\n        //SwissKnife.inject(this);           //       #1   Compile Error\r\n        SwissKnife.restoreState(this, savedInstanceState);\r\n    }\r\n    @OnClick(R.id.testBtn)\r\n    def testIt(){\r\n        Log.e(\"TEST\",\"work withouit swissknife.inject\")         //   #2 doesn't work\r\n    }\r\n}\r\n```\r\n\r\nProblem 1:  If I input SwissKnife.inject(this)    , Compile Error as below:\r\n\r\n```\r\n Caused by: groovy.lang.MissingMethodException: \r\nNo signature of method: \r\nme.android.KF.activities.Login.KFLoginActivity.injectViews() is applicable for argument types: \r\n(me.android.KF.activities.Login.KFLoginActivity) values: \r\n[me.android.KF.activities.Login.KFLoginActivity@4274bee0]\r\n```\r\n\r\nAlright, I checked previous issues/answers, and it seems \"SwissKnife.inject(this) \" is not necessary? Then I comment it, and here comes another problem:\r\n\r\nProblem 2: @OnClick(R.id.testBtn) never works.\r\n\r\nP.S. I 'm a groovy player, and codes are in correct position under groovy/ folder as required.\r\nAny idea? Please help! Thanks\r\n"},"comment":{"url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/comments/94510927","html_url":"https://github.com/Arasthel/SwissKnife/issues/18#issuecomment-94510927","issue_url":"https://api.github.com/repos/Arasthel/SwissKnife/issues/18","id":94510927,"user":{"login":"Arasthel","id":480955,"avatar_url":"https://avatars.githubusercontent.com/u/480955?v=3","gravatar_id":"","url":"https://api.github.com/users/Arasthel","html_url":"https://github.com/Arasthel","followers_url":"https://api.github.com/users/Arasthel/followers","following_url":"https://api.github.com/users/Arasthel/following{/other_user}","gists_url":"https://api.github.com/users/Arasthel/gists{/gist_id}","starred_url":"https://api.github.com/users/Arasthel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arasthel/subscriptions","organizations_url":"https://api.github.com/users/Arasthel/orgs","repos_url":"https://api.github.com/users/Arasthel/repos","events_url":"https://api.github.com/users/Arasthel/events{/privacy}","received_events_url":"https://api.github.com/users/Arasthel/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T17:07:13Z","updated_at":"2015-04-20T17:07:13Z","body":"If you could do what @eugene-kamenev said, that would be great.\r\n\r\nI've already tried it myself and I can't really make it fail...\r\n\r\n![Sample modified](http://i.imgur.com/mZsXewr.jpg)\r\n\r\nAs you can see, I created 2 levels of subpackaging and moved the `BackgroundActivity` class to the lower of them. Then I just hit run and the compilation works just fine. Maybe it's some configuration error or something :worried:."}}