toolargetool

by guardian

guardian /toolargetool

A tool to help you debug TransactionTooLargeExceptions on Android 7

502 Stars 60 Forks Last release: Not found MIT License 96 Commits 8 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Now in Kotlin!

toolargetool

A tool for debugging

TransactionTooLargeException
on Android.

"Most underrated solution." - Kedar Paranjape, Jun 7 '18 at 14:26

Usage

  1. Include
    toolargetool
    as a dependency (you can remove it again once you've debugged your crash):
- Add `maven { url 'https://dl.bintray.com/guardian/android' }` in your project's `build.gradle`:

  allprojects {
      repositories {
          jcenter()
          ...
          maven { url 'https://dl.bintray.com/guardian/android' }
      }
  }
  • Add implementation 'com.gu.android:toolargetool:[email protected]' in your module's build.gradle:

    dependencies {
        ...
        implementation 'com.gu.android:toolargetool:[email protected]'
    }

  1. Add code to start logging during app start, for example in your

    Application.onCreate
    method:
  2. TooLargeTool.startLogging(this);

  3. Monitor logcat output to see which components are writing substantial data to the transaction buffer and when:

    $ adb logcat -s TooLargeTool

Example logcat output (TODO: improve this example):

   D/TooLargeTool: MainActivity.onSaveInstanceState wrote: [email protected] contains 1 keys and measures 0.6 KB when serialized as a Parcel
                                                                           * android:viewHierarchyState = 0.6 KB

Release process

Note: these instructions will only work if you have the relevant Bintray credentials

  1. Open
    toolargetool/bintray.gradle
    .
  2. Increase all the version numbers.
  3. Make a commit and tag it with
    git tag -a v -m ""
    .
  4. Run
    ./gradlew clean install && ./gradlew bintrayUpload
    .

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.