{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6131","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6131/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6131/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6131/events","html_url":"https://github.com/facebook/react-native/issues/6131","id":136123875,"number":6131,"title":"[Android] Stetho should NOT be packaged with release builds","user":{"login":"AndrewJack","id":798942,"avatar_url":"https://avatars.githubusercontent.com/u/798942?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewJack","html_url":"https://github.com/AndrewJack","followers_url":"https://api.github.com/users/AndrewJack/followers","following_url":"https://api.github.com/users/AndrewJack/following{/other_user}","gists_url":"https://api.github.com/users/AndrewJack/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewJack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewJack/subscriptions","organizations_url":"https://api.github.com/users/AndrewJack/orgs","repos_url":"https://api.github.com/users/AndrewJack/repos","events_url":"https://api.github.com/users/AndrewJack/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewJack/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/Android","name":"Android","color":"bfe5bf"},{"url":"https://api.github.com/repos/facebook/react-native/labels/For%20Discussion","name":"For Discussion","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-24T17:08:56Z","updated_at":"2016-04-01T15:05:34Z","closed_at":null,"body":"Stetho is a debug tool which should not be packaged with a React Native release app. \r\nIncluding Stetho unnecessarily bloats the APK size. \r\n\r\n### Steps to reproduce:\r\n1. `react-native init stethoExample`\r\n2. `cd stethoExample/android && ./gradlew app:assembleRelease`\r\n3. Find APK in `stethoExample/android/app/build/outputs/apk`\r\n4. Open apk in [ClassyShark](https://github.com/google/android-classyshark)\r\n5. See Stetho included in APK (Screenshot)\r\n\r\n### Screenshot of release APK:\r\n![Example screenshot](http://i.imgur.com/RdCecd0.png)\r\n\r\n### Details\r\n- **Version:** 0.20.0 (All affected)\r\n- **Platform:** Android\r\n\r\n## Potential fixes\r\n1. Do not include Stetho as a dependency of the Android Library, but provide interfaces to allow developers to integrate themselves. Also add Stetho integration to the Android template.\r\n2. ~~Implement a no-op version of Stetho (Similar to [LeakCanary](https://github.com/square/leakcanary/tree/master/leakcanary-android-no-op)), which can be used to replace the original dependency for release builds. Gradle can be used to manage [transitive dependencies](https://docs.gradle.org/current/userguide/dependency_management.html).~~ (Doesn't seem likely - https://github.com/facebook/stetho/issues/322)"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/204431420","html_url":"https://github.com/facebook/react-native/issues/6131#issuecomment-204431420","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6131","id":204431420,"user":{"login":"AndrewJack","id":798942,"avatar_url":"https://avatars.githubusercontent.com/u/798942?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewJack","html_url":"https://github.com/AndrewJack","followers_url":"https://api.github.com/users/AndrewJack/followers","following_url":"https://api.github.com/users/AndrewJack/following{/other_user}","gists_url":"https://api.github.com/users/AndrewJack/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewJack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewJack/subscriptions","organizations_url":"https://api.github.com/users/AndrewJack/orgs","repos_url":"https://api.github.com/users/AndrewJack/repos","events_url":"https://api.github.com/users/AndrewJack/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewJack/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T15:05:34Z","updated_at":"2016-04-01T15:05:34Z","body":"Resolved here https://github.com/facebook/react-native/commit/3c488afb0fa09c7fc1189f3e4c0932c28045f065"}}