Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
解決むずかったバグ3選
Search
horitamon
April 12, 2022
Programming
520
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
解決むずかったバグ3選
horitamon
April 12, 2022
More Decks by horitamon
See All by horitamon
Kotlin Multiplatformで考えるクリーンアーキテクチャ
horitamon
0
330
スタートアップ企業のフェーズ転換期を乗り越えるためのリアーキテクト戦略
horitamon
0
610
ActでGithub Actionsの動作確認をする
horitamon
0
1.5k
Bitrise Pipelinesを使って リリース作業を効率化する
horitamon
0
74
コルーチンを使って処理の見通しをよくする
horitamon
2
2.4k
「OK Google」でアプリの機能を呼び出してみる
horitamon
0
1.7k
Other Decks in Programming
See All in Programming
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
280
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
910
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
230
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
440
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Deep dive into the select statement (GopherCon UK)
jespino
0
170
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
480
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
220
Family mrubyの進捗
kishima
1
110
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
120
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
1.1k
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
The Invisible Side of Design
smashingmag
301
52k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
270
Skip the Path - Find Your Career Trail
mkilby
1
220
The Cost Of JavaScript in 2023
addyosmani
55
10k
Code Reviewing Like a Champion
maltzj
528
40k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Embracing the Ebb and Flow
colly
88
5.2k
Designing for Performance
lara
611
70k
Transcript
解決むずかったバグ3選 2022/04/12 Android個人開発LT @horitamon
• モバイルアプリエンジニア (Androidがメイン) • 2021/09 Voicy入社 • 今年スノボにハマって 18回ゲレンデへ •
なぜか小学校の教員免許持ってる 自己紹介 horitamon(堀 多聞)
©2022 Voicy, Inc. はじめに • Bluetooth LE使ってデータやりとりできるアプリをつくってます • 全然進んでないので今日は話しません()
• アプリ開発をしていて「ちゃんと事前に検証しておけばよかった…」と 反省したバグを赤裸々にご紹介 • ご迷惑をかけたユーザーのみなさま、大変申し訳ありませんでした。 今回の発表内容
バグ① RecyclerViewの読み込みがめっちゃ重い
Android iOS
原因: RecyclerViewの高さを可変にしていることで描画処 理が毎回走る
©2022 Voicy, Inc. 原因 • RecyclerViewは同じようなレイアウトをたくさん表示するときに 描画を効率化してくれる →画面に表示されていない範囲は描画しない • 「もっと見る」を押してRecyclerViewの要素を追加すると
RecyclerViewの表示範囲が広がるように実装していた →全要素の描画処理が一気に走ってしまう
端末の表示範囲 NestedScrollView RecyclerView 端末の表示範囲 NestedScrollView RecyclerView
端末の表示範囲 NestedScrollView RecyclerView 端末の表示範囲 NestedScrollView RecyclerView 全部描画!
©2022 Voicy, Inc. 対策 • ベストは併用しないこと • 併用するとしたらRecyclerViewの高さを固定にする →表示範囲外のitemはスクロールした後に描画処理が走る
端末の表示範囲 NestedScrollView RecyclerView 端末の表示範囲 NestedScrollView RecyclerView 暫定的に固定して スクロールできるように
バグ② たまにしかPush通知が届かない
©2022 Voicy, Inc. 現象 • Firebase Cloud Messagingを使ってPush通知を実装している • 動作確認のタイミングでは大体通知が届く
• 放送開始、運営からのお知らせなど、種別問わずすべての通知が届く • 開発版でも製品版でも届く • でもしばらく使ってると届かなくなる… Push通知が来ることには来る、でも来なくなる
原因: トークン更新処理が完了する前に トークンを再発行していた
None
None
https://firebase.google.com/docs/reference/android/com/google/firebase /messaging/FirebaseMessaging?authuser=0#public-methods
https://firebase.google.com/docs/reference/android/com/google/firebase /messaging/FirebaseMessaging?authuser=0#public-methods
https://firebase.google.com/docs/reference/android/com/google/firebase /messaging/FirebaseMessaging?authuser=0#public-methods 非同期
©2022 Voicy, Inc. 原因と対策 • firebase-bomを26.2.0→28.2.0にアップデートした →そのタイミングでFirebaseMessaging.deleteToken()が 非同期メソッドに変わった •
トークンの削除が完了する前に発行処理をしていたので 発行後にトークンが更新されていた • 完了を待機してから再発行するように修正
削除完了を 待機
バグ③ Android 8の端末だけアプリ起動できない
©2022 Voicy, Inc. 現象 • シンプルにAndroid 8だけ起動しない • 8より古いOSも、新しいOSも起動する
Android 8だけアプリが起動しない
©2022 Voicy, Inc. 原因と対策 • 以下の条件を満たすとクラッシュする ◦ Android 8.0
の端末 ◦ targetSdkVersion が 27 以上 ◦ 背景を透過にしている ◦ 画面の向きを固定している • アプリ全てで使ってるStyleで android:windowIsTranslucentをtrueにしてしまった →すぐ設定を削除
©2022 Voicy, Inc. 原因と対策 • 下記の記事に救われました…ありがとう… ◦ java.lang.IllegalStateException: Only
fullscreen opaque activities can request orientation - Qiita
ぜひ日々のプロダクト開発や個人開発で 同じ轍を踏まないよう 参考にして頂けますと幸いです…
音声×テクノロジーでワクワクする社会をつくる