{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1304","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1304/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1304/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1304/events","html_url":"https://github.com/realm/realm-java/issues/1304","id":95848086,"number":1304,"title":"Realm and ButterKnife 7.+","user":{"login":"FHellmann","id":5815289,"avatar_url":"https://avatars.githubusercontent.com/u/5815289?v=3","gravatar_id":"","url":"https://api.github.com/users/FHellmann","html_url":"https://github.com/FHellmann","followers_url":"https://api.github.com/users/FHellmann/followers","following_url":"https://api.github.com/users/FHellmann/following{/other_user}","gists_url":"https://api.github.com/users/FHellmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FHellmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHellmann/subscriptions","organizations_url":"https://api.github.com/users/FHellmann/orgs","repos_url":"https://api.github.com/users/FHellmann/repos","events_url":"https://api.github.com/users/FHellmann/events{/privacy}","received_events_url":"https://api.github.com/users/FHellmann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-18T18:31:47Z","updated_at":"2015-08-12T04:54:51Z","closed_at":"2015-07-20T10:57:59Z","body":"Realm in combination with ButerKnife 7.+ there will always be an exception thrown:\r\n```java\r\nCaused by: java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.TypeElement\r\n    at io.realm.processor.RealmProcessor.process(RealmProcessor.java:125)\r\n    at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)\r\n    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)\r\n    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)\r\n    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)\r\n    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)\r\n    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1108)\r\n    at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)\r\n    at com.sun.too\r\n```\r\nThe only way to get back to a working version is to revert ButterKnife back to 6.1.0. Trying to revert Realm back does not work.\r\n\r\nThere was already an issue about this error: #885\r\n\r\nIt would be very nice if this could be fixed!"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/130161354","html_url":"https://github.com/realm/realm-java/issues/1304#issuecomment-130161354","issue_url":"https://api.github.com/repos/realm/realm-java/issues/1304","id":130161354,"user":{"login":"ronjumola","id":13181946,"avatar_url":"https://avatars.githubusercontent.com/u/13181946?v=3","gravatar_id":"","url":"https://api.github.com/users/ronjumola","html_url":"https://github.com/ronjumola","followers_url":"https://api.github.com/users/ronjumola/followers","following_url":"https://api.github.com/users/ronjumola/following{/other_user}","gists_url":"https://api.github.com/users/ronjumola/gists{/gist_id}","starred_url":"https://api.github.com/users/ronjumola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronjumola/subscriptions","organizations_url":"https://api.github.com/users/ronjumola/orgs","repos_url":"https://api.github.com/users/ronjumola/repos","events_url":"https://api.github.com/users/ronjumola/events{/privacy}","received_events_url":"https://api.github.com/users/ronjumola/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T04:54:51Z","updated_at":"2015-08-12T04:54:51Z","body":"Hi! I'm trying this:\r\n\r\n    dependencies {\r\n        compile fileTree(dir: 'libs', include: ['*.jar'])\r\n        .\r\n        .\r\n        .\r\n        compile 'io.realm:realm-android:0.82.1'\r\n        compile 'com.jakewharton:butterknife:7.0.1'\r\n    }\r\n\r\n\r\n\r\nAnd it's producing an error:\r\n\r\n    Error:duplicate files during packaging of APK /Users/..../app-debug-unaligned.apk\r\n    Path in archive: META-INF/services/javax.annotation.processing.Processor\r\n\tOrigin 1: /Users/macbookair/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/7.0.1/d5d13ea991eab0252e3710e5df3d6a9d4b21d461/butterknife-7.0.1.jar\r\n\tOrigin 2: /Users/macbookair/.gradle/caches/modules-2/files-2.1/io.realm/realm-android/0.82.1/3e4f47bc60063111a375200f866192bf821efa93/realm-android-0.82.1.jar\r\n\r\n    You can ignore those files in your build.gradle:\r\n\tandroid {\r\n\t  packagingOptions {\r\n\t    exclude 'META-INF/services/javax.annotation.processing.Processor'\r\n\t  }\r\n\t}\r\n\r\n\r\nI tried the suggestion from Android Studio but it's producing too much drawbacks so I cannot use the suggestion.\r\n\r\n\r\nAny suggestions what to do? \r\n\r\n"}}