{"action":"created","issue":{"url":"https://api.github.com/repos/evernote/android-job/issues/77","repository_url":"https://api.github.com/repos/evernote/android-job","labels_url":"https://api.github.com/repos/evernote/android-job/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/evernote/android-job/issues/77/comments","events_url":"https://api.github.com/repos/evernote/android-job/issues/77/events","html_url":"https://github.com/evernote/android-job/issues/77","id":176805712,"number":77,"title":"proguard use -repackageclasses maybe crash","user":{"login":"Haoxiqiang","id":3881604,"avatar_url":"https://avatars.githubusercontent.com/u/3881604?v=3","gravatar_id":"","url":"https://api.github.com/users/Haoxiqiang","html_url":"https://github.com/Haoxiqiang","followers_url":"https://api.github.com/users/Haoxiqiang/followers","following_url":"https://api.github.com/users/Haoxiqiang/following{/other_user}","gists_url":"https://api.github.com/users/Haoxiqiang/gists{/gist_id}","starred_url":"https://api.github.com/users/Haoxiqiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haoxiqiang/subscriptions","organizations_url":"https://api.github.com/users/Haoxiqiang/orgs","repos_url":"https://api.github.com/users/Haoxiqiang/repos","events_url":"https://api.github.com/users/Haoxiqiang/events{/privacy}","received_events_url":"https://api.github.com/users/Haoxiqiang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/evernote/android-job/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/evernote/android-job/labels/not%20released%20yet","name":"not released yet","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"vRallev","id":1558045,"avatar_url":"https://avatars.githubusercontent.com/u/1558045?v=3","gravatar_id":"","url":"https://api.github.com/users/vRallev","html_url":"https://github.com/vRallev","followers_url":"https://api.github.com/users/vRallev/followers","following_url":"https://api.github.com/users/vRallev/following{/other_user}","gists_url":"https://api.github.com/users/vRallev/gists{/gist_id}","starred_url":"https://api.github.com/users/vRallev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vRallev/subscriptions","organizations_url":"https://api.github.com/users/vRallev/orgs","repos_url":"https://api.github.com/users/vRallev/repos","events_url":"https://api.github.com/users/vRallev/events{/privacy}","received_events_url":"https://api.github.com/users/vRallev/received_events","type":"User","site_admin":false},"assignees":[{"login":"vRallev","id":1558045,"avatar_url":"https://avatars.githubusercontent.com/u/1558045?v=3","gravatar_id":"","url":"https://api.github.com/users/vRallev","html_url":"https://github.com/vRallev","followers_url":"https://api.github.com/users/vRallev/followers","following_url":"https://api.github.com/users/vRallev/following{/other_user}","gists_url":"https://api.github.com/users/vRallev/gists{/gist_id}","starred_url":"https://api.github.com/users/vRallev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vRallev/subscriptions","organizations_url":"https://api.github.com/users/vRallev/orgs","repos_url":"https://api.github.com/users/vRallev/repos","events_url":"https://api.github.com/users/vRallev/events{/privacy}","received_events_url":"https://api.github.com/users/vRallev/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-09-14T03:29:33Z","updated_at":"2016-09-14T10:38:36Z","closed_at":null,"body":"proguard set by:\r\n`-repackageclasses`\r\n\r\nJobManager will throw a RuntimeException from this:\r\n`private static final String PACKAGE = JobManager.class.getPackage().getName();`\r\n\r\nI check the source,I find `getPackage()` maybe return a null object\r\n```\r\npublic Package getPackage() {\r\n        // TODO This might be a hack, but the runtime doesn't have the necessary info.\r\n        ClassLoader loader = getClassLoader();\r\n        if (loader != null) {\r\n            String packageName = getPackageName$();\r\n            return packageName != null ? loader.getPackage(packageName) : null;\r\n        }\r\n        return null;\r\n}\r\n```\r\n\r\nI add a proguard rule:\r\n`-keepnames public class com.evernote.android.job.JobManager`\r\n\r\nI think I solve it,`JobManager.class.getPackage().getName();`  may not be a good way."},"comment":{"url":"https://api.github.com/repos/evernote/android-job/issues/comments/246973035","html_url":"https://github.com/evernote/android-job/issues/77#issuecomment-246973035","issue_url":"https://api.github.com/repos/evernote/android-job/issues/77","id":246973035,"user":{"login":"vRallev","id":1558045,"avatar_url":"https://avatars.githubusercontent.com/u/1558045?v=3","gravatar_id":"","url":"https://api.github.com/users/vRallev","html_url":"https://github.com/vRallev","followers_url":"https://api.github.com/users/vRallev/followers","following_url":"https://api.github.com/users/vRallev/following{/other_user}","gists_url":"https://api.github.com/users/vRallev/gists{/gist_id}","starred_url":"https://api.github.com/users/vRallev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vRallev/subscriptions","organizations_url":"https://api.github.com/users/vRallev/orgs","repos_url":"https://api.github.com/users/vRallev/repos","events_url":"https://api.github.com/users/vRallev/events{/privacy}","received_events_url":"https://api.github.com/users/vRallev/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T10:38:36Z","updated_at":"2016-09-14T10:38:36Z","body":"Cool, thanks for the feedback!"}}
{"actor":{"display_login":"vRallev"}}