Upgrade to Pro — share decks privately, control downloads, hide ads and more …

気になったセッションから今すぐ開発に導入したいあれこれ(主観

kobashin
November 07, 2019

 気になったセッションから今すぐ開発に導入したいあれこれ(主観

kobashin

November 07, 2019
Tweet

More Decks by kobashin

Other Decks in Technology

Transcript

  1. ࢹௌͨ͠ηογϣϯ • Keynote • What’s New in Android Studio •

    LiveData with Coroutine Flow • Fragments Past / Future • Androidx Webkit • Going Edge to Edge with Gesture Navigation • Supercharge Sharing to your App • Migrate to Androidx: The time is right • Debugging Tips and n’Tricks • Performance Myth Busters • Demystify the Data 
 in Android Studio Profilers • Monitoring and Improving 
 Real-World Stability and Performance • Fragments Past / Future • Performance Analysis Using Systrace
  2. ηογϣϯͰऔΓ্͛ΒΕ͍֤ͯͨࣾͷରԠࣄྫ • Migrated from background services to MediaBrows erService(API26) •

    Moved to WorkManager • Reduced use of Shared Preferences • Reorganized the app graph to perform less object i nstantiation in application's onCreate()
  3. ProfilerΛ࢖ͬͯϝϞϦϦʔΫͱରቂ͢Δ • CPU / Memory / Network / EnergyͷࢦඪͰݟΕΔ •

    Memoryʹ Leaked Activities and Fragments ͕૿͑ ͯΔʢAS3.6ʣ
  4. ActivityͱFragmentͷϦʔΫͱ͸ʁ • Activity • Has been destroyed but is still

    referenced • Fragment • Does not have a valid FragmentManager 
 but is still referenced • Possible false positives • Created but has not yet been used • Being cached but not as part of a Fragmenttransaction
  5. Jetpack / AndroidX • I/O 2018ͰSupport Library Λ androidxͷnamespaceʹ
 Ҡ͢ൃද͕͞Εͨ

    • ͢ͰʹSupport Library͸28.0.xͰ։ൃ͕ࢭ·͍ͬͯΔ • όάϑΟοΫεɺ৽ػೳ͸AndroidXʹ • ੵۃతʹ࢖͍͖͍͚ͬͯͨͲɺҠߦ͕ɺɺ
  6. Migrating to AndroidX 1. Update to SL 28 AndroidX΁ͷҠߦ =ʮAPI

    ChangeʯʮPackage Changeʯ Support Library 28 <=> AndroidX 1.0ͷࠩ෼͸PackageͷΈ ·ͣ͸SL28΁ͷΞοϓσʔτΛߦ͍ɺ API changesʹΑͬͯյΕͳ͍͜ͱΛ֬ೝ͢Δ
  7. Migrating to AndroidX 2. Enable Jetifier Jetifier will: - Migrate

    your third-party dependencies to use AndroidX Jetifier will not: - Migrate your source code - Migrate generated code
  8. Migrating to AndroidX 5. Bash Script or Edit yourself Replace

    all source code instance of support library packages with their AndroidX version https://goo.gle/androidx-migration-script
  9. Migrationͷ͋ͱͰ • Patterns we can't automate • ext౳ʹهड़͍ͯ͠Δόʔδϣϯม਺Λॻ͖׵͑Δ͜ͱ͸͠ ͯ͘Εͳ͍ͷͰɺͦ͜͸ࣗ෼Ͱ΍Δඞཁ͋Γ •

    Proguard files • Build scripts • όʔδϣϯ͕alpha൛ͱ͔ʹͳ͍ͬͯΔ΍ͭ΋͋Δ͔Βɺࣗ ෼Ͱstable൛ͱ͔ʹม͑Δ