Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android開発の罠と、その避け方
Search
nakawai
April 23, 2017
Programming
0
22
Android開発の罠と、その避け方
nakawai
April 23, 2017
Tweet
Share
More Decks by nakawai
See All by nakawai
エンジニアがエンジニアリングマネージャーになって最初にやったこと
nakawai
2
930
電卓アプリで再帰降下法を使った話
nakawai
0
140
AndroidでTensorflow
nakawai
0
27
テンプレート作ると爆速Android 開発できる?
nakawai
0
20
AndroidでSRCNN 2017
nakawai
0
31
AndroidでSRCNNできる?
nakawai
0
45
Other Decks in Programming
See All in Programming
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
370
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Activities at Cairo Library
cairolibrary720
0
1.2k
AHC035解説
terryu16
0
710
TiDB Serverless ~理想のServerless DBを考える~
soso_15315
1
160
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
How to use Macrobenchmark
veronikapj
0
160
社内 LT 会を発足し、アウトプット文化を醸成させるために考えたこと・やったこと / Starting internal LT meetings and fostering an output culture
mackey0225
3
120
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
Webエディタライブラリ 「CodeMirror」から学ぶ Webアプリ開発のテクニック
ryosukeigarashi
0
250
Play Billing Library 7.0.0 変更点まとめ@potatotips#88
kako351
0
160
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
Featured
See All Featured
Scaling GitHub
holman
458
140k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
18
1.2k
[RailsConf 2023] Rails as a piece of cake
palkan
35
4.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Gamification - CAS2011
davidbonilla
78
4.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
How STYLIGHT went responsive
nonsquared
93
5k
RailsConf 2023
tenderlove
16
720
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
189
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
Transcript
Android開発の ワナと、その避け方 @nakawai 2017/4/23 かものはし
開発中の ある日
原因を探ると Activity/Fragmentのメンバ変数 mHogeが、なぜかnull 再現不可
やりがち if(mHoge != null){...}
根本的な 原因は? なぜnullに?
答え: 再生成
Androidのメモリ管理 メモリが足りない ↓ backgroundのアプリを、いったん破棄 ↓ 必要なときに再生成
ルールを 知らないと、 状態が 復元されない
nullの理由 所定の手続きを 経ていなかった
主要コンポーネントの ライフサイクルを把握すれば 回避可能 • #onSavedInstanceState() • Fragment#setArguments() • Parcelable
テスト 「常にActivityを破棄」をON
微妙な点 コールバック記述が 冗長になる ダイアログなど
「Android開発の罠と、その避け方」 以上 なにか質問あれば