FIT2081 Lecture Notes - Lecture 12: Gradle, Main Source, Password Strength

92 views6 pages
!"#$%#&'()*+,
-./0#$12
3
4"&5#&%16(
7"#$%(8.&9#'"2:;#.&,
!"#$%(;<01,
§
*2.%"8;(9$:=."2,
§
!"#$%(=:2#:&;,
§
>#'&#9#8:&;$<(21%"81,(;?1(;#/1(;:@1&(;.("0%:;1(<."2(:00(A#;?(
8.%1(:&%(21,."281(8?:&'1,
§
B,018#:$$<(71&19#8#:$(9.$$.A#&'(,/:$$12(8?:&'1,C(,"8?(:,(;"&#&'(
;?1(0.,#;#.&(.9(:(D#1A
§
),(217"#$%#&'(;?1(A?.$1(:00(E",;(;.("0%:;1(;?:;(,/:$$(8?:&'1(
A."$%(71(/"8?(/.21(#&199#8#1&;(;?:&(E",;(",#&'(F&,;:&;(
4"&GH2:%$1(
I.(&11%(;.(217"#$%()*+(1=12<(;#/1
J
§
K(,81&:2#.,(A?121(#;(A.2@,(LMN*B>O
F/0$1/1&;:;#.&(8.%1(.9(:&(16#,;#&'(/1;?.%(#,(8?:&'1%G(
F&,;:&;(4"&(0129.2/,(:(?.;(,A:0 A?#8?(#,(16;21/1$<(9:,;(:,(
&1#;?12(;?1(:8;#=#;<(&.2(;?1(:00(&11%(;.(71(21,;:2;1%G
J
)&(16#,;#&'(21,."281(#,(8?:&'1%(.2(21/.=1%G(F&,;:&;(4"&(
0129.2/,(:(A:2/(,A:0 A?#8?(21,;:2;,(;?1(8"221&;(:8;#=#;<
A#;?.";(21,;:2;#&'(;?1(:00G
J
>;2"8;"2:$(8.%1(#,(8?:&'1%C(,"8?(:,(#&%1&;:;#.&,C(,;:;#8(
9#1$%,C(/1;?.%(,#'&:;"21,C(#/0$1/1&;1%(#&;129:81,C(,;:;#8(
#&#;#:$#,12,G(F&,;:&;(4"&(0129.2/,(:(8.$%(,A:0 A?#8?(21,;:2;,(
;?1(A?.$1(:00 ;.("0%:;1(;?1,1(8?:&'1,G
J
§
P(,81&:2#.,(A?121(#;(%.1,&Q;(A.2@
)00(/:&#91,;C(.2(21,."281,(219121&81%(7<(;?1(:00(
/:&#91,;C(:21(8?:&'1%G(
J
)&%2.#%(,<,;1/(RF(1$1/1&; 8?:&'1%G
F&,;:&;(4"&(8:&&.;(9"$$<(0129.2/(#;,(%1,#21%(9"&8;#.&C(:,(
.&$<(4"&(8:&(02.012$<("0%:;1()&%2.#%(,<,;1/(RF(1$1/1&;,(
,"8?(:,(A#%'1;,(.2(&.;#9#8:;#.&,G
§
3
>#'&#&'()*+,
App&Signing LS#,,"1,(#&=.$=1%(2:;?12(;?:&(0210(;.(%.(#;O
T",;(:$A:<,(?:001&(719.21(21$1:,1()*+(#,('1&12:;1%(7<()&%2.#%(
>;"%#.(;.("0$.:%(#&;.(;?1(H..'$1(*$:<(>;.21
H1&12:;1(<."2(.A&(U(02#=:;1(@1<
§
V4(",1(A?:;(<."(:$21:%<(?:=1
§
3
*"7$#8W@1<(812;#9#8:;13
X(8.&;:#&,(0"7$#8(@1<(.9(@1<(0:#2C(:,(A1$$(:,(.;?12(/1;:%:;:(#%1&;#9<#&'(
;?1(.A&12(.9(;?1(@1<(L1'G(&:/1(:&%($.8:;#.&O
)+)(%#'#;:$5#%1&;#;<(812;#9#8:;1
-12;#9#8:;1(.A&12(?.$%,(8.221,0.&%#&'(02#=:;1(@1<
>12=1,(:,(Y9#&'1202#&;Y("&#Z"1$<(:,,.8#:;#&'()*+(;.(<."(:&%(<."2(
02#=:;1(@1<(A?1&(,#'&#&'(,#&81(:;;:8?1%(;.()*+
)&%2.#%(8:&(1&,"21(:&<(9";"21()*+("0%:;1,(:21(:";?1&;#8(
:&%(8./1(92./(;?1(.2#'#&:$(:";?.2
§
>:/1(812;#9#8:;1(",1%(;?2."'?.";(:00($#91,0:&(;.(#&,;:$$(&1A(
=12,#.&,(:,("0%:;1,
[17"'(812;#9#8:;1
)";./:;#8:$$<(821:;1%(:$.&'(A#;?(%17"'(@1<,;.21(#&(
\]VTB5G:&%2.#%5%17"'G@1<,;.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=:;1(@1<
*2.;18;1%(7<(:(,;2.&'(0:,,A.2%
B:8?(@1<(:$,.(02.;18;1%(7<(:(,;2.&'(0:,,A.2%
3
+110(#&(:(,:91(:&%(,18"21(0$:813
*2#=:;1(@1<(,18"2#;<(#/0.2;:&;(718:",1c
F9($.,;C
>./1.&1(1$,1(",1,(<."2(@1<
§
+1<(:&%(05A,(#&("&,:91($.8(A?121(;?#2%(0:2;<(8."$%(9#&%(:&%(",1
)";?.2#&'(#%1&;#;<(8./02./#,1%J
R,12(;2",;(8./02./#,1%
N."2(A?121:7.";,(:21("&@&.A&
®
§
F9(8./02./#,1%C
M?#2%(0:2;<(;:@1,(<."2(@1<(A5.(@&.A$1%'1(.2(012/#,,#.&
-:&(,#'&(:&%(%#,;2#7";1(:00,(;?:;c
T:$#8#.",$<(210$:8158.22"0;(<."2(:";?1&;#8(:00,
®
)21("&%12(<."2(#%1&;#;<(7";(:;;:8@(.;?12(
:00,5,<,;1/C(.2(8.22"0;5,;1:$(",12(%:;:
®
J
§
F9('1&12:$$<($.,;C(A#$$(71("&:7$1(;.(0"7$#,?("0%:;1,(;.(16#,;#&'(:00
*21=#.",$<('1&12:;1%(@1<(8:&Q;(71(21'1&12:;1%
§
]:=1(;.('1&12:;1(&1A(@1<
-",;./12,(A.&Q;(218.'&#,1C(8."$%($.,1(,./1J
§
3
)$$(:00,(&11%(;.(71(%#'#;:$$<(,#'&1%(;.(,"881,,9"$$<("0$.:%(;.(:&(
1/"$:;.25%1=#81(7<(:(@1<
3
F9(#&(%17"'(7"#$%(;<01(L.&$<(;1,;#&'(:&%(02.9#$#&'OC(0:8@:'12(,#'&,(<."2(:00(
A#;?(;?1(debug keystore :";./:;#8:$$<(8.&9#'"21%(7<()&%2.#%(>;"%#.
X(YA:$$1;Y(.9()&%2.#%(9.2(,:=#&'(<."2(@1<,(L02#=:;150"7$#8(@1<(0:#2O
V&$<(#&(21$1:,1(7"#$%(;<01(&11%(;.(A.22<(:7.";('1&12:;#&'(<."2(.A&
3
Why&does&an&app&need&to&be&signed&using&a&private&key&of&a&cryptographic&key&pair?
M?1(02#=:;1(@1<(;?:;(<."(?.$%(;?:;(8.221,0.&%,(;.(#;,(0"7$#8(@1<(A#$$(71(21Z"#21%C(
,#&81(;?1(,:/1(812;#9#8:;1(:,,.8#:;1%("&#Z"1$<(A#;?(<."2(0"7$#8502#=:;1(@1<(0:#2(/",;(
71(",1%(A?1&(<."(#&,;:$$("0%:;1,(;.(;?1(:00(#&(9";"21G()$,.C(;?1(02#=:;1(@1<(,12=1,(:,(
<."2(,#'&:;"21C(:&%(#%1&;#9#1,(<."("&#Z"1$<(9.2()&%2.#%(;.(1&,"21(9";"21("0%:;1,(;.(
<."2()*+(:21(:";?1&;#8(:&%(8./1(92./(;?1(.2#'#&:$(:";?.2G
What&are&the&consequences&if&the&private&key&of&one&of&your&apps&becomes&
compromised&without&your&knowledge&(i.e.&someone&else&acquires&it)?
M?1(012,.&(A?.(:8Z"#21%(;?1(02#=:;1(@1<(8."$%(,#'&(:&%(%#,;2#7";1(:00,(;?:;c
hG(/:$#8#.",$<(210$:81(<."2(:";?1&;#8(:00,(.2(8.22"0;(;?1/
PG(:;;:8@(.;?12(:00,(.2(;?1(,<,;1/(#;,1$9C(.2(8.22"0;(:&%(,;1:$(",12(%:;:
Explain&what&a&Source&Set&is&and&how&Gradle&uses&them.
)(>."281(>1;(#,(:($.'#8:$('2."0(.9(-U4(",1%(7<(H2:%$1(A?1&(7"#$%#&'(:(0:2;#8"$:2(7"#$%(
=:2#:&;G(`?1&(:(,."281(9#$1(8.&;:#&,(;?1(,:/1(9#$1C(H2:%$1(21,.$=1,(;?1(:/7#'"#;<(7<(
",#&'(:(021%19#&1%(02#.2#;<(,<,;1/C(:&%(.=122#%1,(:(0:2;#8"$:2(,."281(,1;(:,(21Z"#21%G
Gradle
X(:(7"#$%(;..$@#;(;?:;(:$$.A,(:(%1=1$.012(;.(%19#&1(:&%(/:&:'1(/"$;#0$1(7"#$%(
8.&9#'"2:;#.&,
Android plugin for Gradle A.2@,(A#;?(H2:%$1(;.(02.=#%1(02.81,,1,(
:&%(8.&9#'"2:7$1(,1;;#&',(,018#9#8(;.(7"#$%#&'(:&%(;1,;#&'()&%2.#%(:00,
3
-:&(,018#9<c
!"#$%(;<01,C(02.%"8;(9$:=."2,C(7"#$%(=:2#:&;,
T:&#91,;(1&;2#1,
[101&%1&8#1,
>#'&#&'
*2.H":2%
T"$;#W)*+(,"00.2;
3
4"&,(8./0#$123
X(8?18@,(8.%1(,<&;:6C(;?1&($#&@,(0:8@:'1,(;';(A#;?(:00C(;?1&('1&12:;1,(
1618";:7$1(8.%1(L.exeO
V";0";,(7<;1(8.%1(L,;%(9.2/:;(9.2(:$$(0$:;9.2/,O(#&(;?1(9.2/(.9(
8./0#$:;#.&("&#;,C(A?#8?(:21(;?1&($#&@1%(;.(21,."281,
>#'&,()*+(A#;?(%17"'521$1:,1(@1<,;.21
Build&configurations
>."281(,1;3
X(:(,1;(.9(8.%1(U(21,."281,(,018#9#8(;.(;?1(7"#$%(8.&9#'"2:;#.&
T:#&(,."281(,1;
X(8.%1(:&%(21,."218,(8.//.&(;.(:$$(=12,#.&,(.9(<."2(:00
!"#$%(;<01,3
X(%19#&1(812;:#&(02.012;#1,(H2:%$1(",1,(A?1&(7"#$%#&'(U(0:8@:'#&'(:00
M<0#8:$$<(8.&9#'"21%(9.2(%#99(,;:'1,(.9(%1=1$.0/1&;($#918<8$1
)&%2.#%(821:;1,(debug :&%(release 7<(%19:"$;
T",;(71(%19#&1%(;.(7"#$%(:00C(;?121(/",;(:$A:<,(71(:;($1:,;(h
§
release =12(.&$<(A?1&(0210:2#&'(:00(9.2(0"7$#8(21$1:,1
§
*2.%"8;(9$:=."2,3
X(21021,1&;(%#99(=12,#.&,(.9(:00(;?:;(%1=1$.012,(/:<(&11%(;.(21$1:,1( ;.(
",12,(L1'G(9211C(0:#%O
-:&(71(8",;./#,1%(;.(",1(%#99(-U4(A?#$1(,?:2#&'(:&%(21",#&'(;?.,1(
8.//.&(;.(:$$(=12,#.&,
V0;#.&:$C(/",;(71(/:&":$$<(821:;1%
!"#$%(=:2#:&;,3
X(82.,,W02.%"8;,(.9(7"#$%(;<01,(:&%(02.%"8;(9$:=."2,
I.;(8.&9#'"21%(%#218;$<C(7";(7<(8.&9#'"2#&'(;?1(7"#$%(;<01,(:&%(
02.%"8;(9$:=."2,(;?:;(9.2/(;?1/
R,1%(;.(7"#$%(%17"'(=12,(.9(02.%"8;(9$:=."2,(%"2#&'(%1=1$.0/1&;C(.2(
,#'&1%(21$1:,1(=12,(.9(02.%"8;(9$:=."2,(9.2(%#,;2#7";#.&
M..$7:2(7";;.&,
!.;?(0:2;(.9(%17"'(7"#$%(A?#8?(#,(#&;1&%1%(,.$1$<(9.2(;1,;#&'3
4"&
`.&Q;(1&':'1(A#;?(%17"''12
`?1&(8$#8@1%C(%17"'(=12(7"#$;(7<()&%2.#%(>;"%#.
3
[17"'
`#$$(1&':'1(A#;?(%17"''12
3
Week$12
M"1,%:<C( Pk(T:<(Pihl
hhchP
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
!"#$%#&'()*+,
-./0#$123
4"&5#&%16(
7"#$%(8.&9#'"2:;#.&,
!"#$%(;<01,
§
*2.%"8;(9$:=."2,
§
!"#$%(=:2#:&;,
§
Instant&Run
>#'&#9#8:&;$<(21%"81,(;?1(;#/1(;:@1&(;.("0%:;1(<."2(:00(A#;?(
8.%1(:&%(21,."281(8?:&'1,
§
B,018#:$$<(71&19#8#:$(9.$$.A#&'(,/:$$12(8?:&'1,C(,"8?(:,(;"&#&'(
;?1(0.,#;#.&(.9(:(D#1A
§
),(217"#$%#&'(;?1(A?.$1(:00(E",;(;.("0%:;1(;?:;(,/:$$(8?:&'1(
A."$%(71(/"8?(/.21(#&199#8#1&;(;?:&(E",;(",#&'(F&,;:&;(
4"&GH2:%$1(
I.(&11%(;.(217"#$%()*+(1=12<(;#/1J
§
K(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:;#.&(:&%(.79",8:;#.&(;:,@,(;?:;(
#/02.=1(199#8#1&8<(:&%(21%"81(8.%1(,#g1
T#&#9#8:;#.&(X(;?1(02.81,,(.9(21/.=#&'(:$$("&&181,,:2<(8?:2:8;12,(
92./(;?1(,."281(8.%1(A#;?.";(8?:&'#&'(#;,(9"&8;#.&:$#;<
*21=1&;,(.";,#%12,(92./(1:,#$<("&%12,;:&%#&'(<."2(8.%1
§
M:@1,(;#/1C(,.(%.&Q;(%.(#;("&&181,,:2#$<
§
3
R,1%(.0;#.&:$$<(#&(21$1:,1(=:2#:&;3
>;2.&'(7";(&.;(hiij(2.7",;
>."281(8.%1(8:&&.;(71(21;2#1=1%(#&(:&<(A:<(92./(;?1(/#&#9#1%(8.%1C(
&.;(1=1&(;?1(%1=1$.012
[.1,&Q;(,12=1(:,(:(7:8@"0C(7";(.&$<(:(,:91'":2%(9.2(A?1&(;?1(:00(:&%(
#;,(8.%1(#,(21$1:,1%(#&;.(;?1(A.2$%
3
+1<,;.21
X(:(7#&:2<(9#$1(8.&;:#&#&'(:;($1:,;(h(02#=:;1(@1<
*2.;18;1%(7<(:(,;2.&'(0:,,A.2%
B:8?(@1<(:$,.(02.;18;1%(7<(:(,;2.&'(0:,,A.2%
3
+110(#&(:(,:91(:&%(,18"21(0$:813
*2#=:;1(@1<(,18"2#;<(#/0.2;:&;(718:",1c
F9($.,;C
>./1.&1(1$,1(",1,(<."2(@1<
§
+1<(:&%(05A,(#&("&,:91($.8(A?121(;?#2%(0:2;<(8."$%(9#&%(:&%(",1
)";?.2#&'(#%1&;#;<(8./02./#,1%J
R,12(;2",;(8./02./#,1%
N."2(A?121:7.";,(:21("&@&.A&
®
§
F9(8./02./#,1%C
M?#2%(0:2;<(;:@1,(<."2(@1<(A5.(@&.A$1%'1(.2(012/#,,#.&
-:&(,#'&(:&%(%#,;2#7";1(:00,(;?:;c
T:$#8#.",$<(210$:8158.22"0;(<."2(:";?1&;#8(:00,
®
)21("&%12(<."2(#%1&;#;<(7";(:;;:8@(.;?12(
:00,5,<,;1/C(.2(8.22"0;5,;1:$(",12(%:;:
®
J
§
F9('1&12:$$<($.,;C(A#$$(71("&:7$1(;.(0"7$#,?("0%:;1,(;.(16#,;#&'(:00
*21=#.",$<('1&12:;1%(@1<(8:&Q;(71(21'1&12:;1%
§
]:=1(;.('1&12:;1(&1A(@1<
-",;./12,(A.&Q;(218.'&#,1C(8."$%($.,1(,./1J
§
3
)$$(:00,(&11%(;.(71(%#'#;:$$<(,#'&1%(;.(,"881,,9"$$<("0$.:%(;.(:&(
1/"$:;.25%1=#81(7<(:(@1<
3
F9(#&(%17"'(7"#$%(;<01(L.&$<(;1,;#&'(:&%(02.9#$#&'OC(0:8@:'12(,#'&,(<."2(:00(
A#;?(;?1(debug keystore :";./:;#8:$$<(8.&9#'"21%(7<()&%2.#%(>;"%#.
X(YA:$$1;Y(.9()&%2.#%(9.2(,:=#&'(<."2(@1<,(L02#=:;150"7$#8(@1<(0:#2O
V&$<(#&(21$1:,1(7"#$%(;<01(&11%(;.(A.22<(:7.";('1&12:;#&'(<."2(.A&
3
Why&does&an&app&need&to&be&signed&using&a&private&key&of&a&cryptographic&key&pair?
M?1(02#=:;1(@1<(;?:;(<."(?.$%(;?:;(8.221,0.&%,(;.(#;,(0"7$#8(@1<(A#$$(71(21Z"#21%C(
,#&81(;?1(,:/1(812;#9#8:;1(:,,.8#:;1%("&#Z"1$<(A#;?(<."2(0"7$#8502#=:;1(@1<(0:#2(/",;(
71(",1%(A?1&(<."(#&,;:$$("0%:;1,(;.(;?1(:00(#&(9";"21G()$,.C(;?1(02#=:;1(@1<(,12=1,(:,(
<."2(,#'&:;"21C(:&%(#%1&;#9#1,(<."("&#Z"1$<(9.2()&%2.#%(;.(1&,"21(9";"21("0%:;1,(;.(
<."2()*+(:21(:";?1&;#8(:&%(8./1(92./(;?1(.2#'#&:$(:";?.2G
What&are&the&consequences&if&the&private&key&of&one&of&your&apps&becomes&
compromised&without&your&knowledge&(i.e.&someone&else&acquires&it)?
M?1(012,.&(A?.(:8Z"#21%(;?1(02#=:;1(@1<(8."$%(,#'&(:&%(%#,;2#7";1(:00,(;?:;c
hG(/:$#8#.",$<(210$:81(<."2(:";?1&;#8(:00,(.2(8.22"0;(;?1/
PG(:;;:8@(.;?12(:00,(.2(;?1(,<,;1/(#;,1$9C(.2(8.22"0;(:&%(,;1:$(",12(%:;:
Explain&what&a&Source&Set&is&and&how&Gradle&uses&them.
)(>."281(>1;(#,(:($.'#8:$('2."0(.9(-U4(",1%(7<(H2:%$1(A?1&(7"#$%#&'(:(0:2;#8"$:2(7"#$%(
=:2#:&;G(`?1&(:(,."281(9#$1(8.&;:#&,(;?1(,:/1(9#$1C(H2:%$1(21,.$=1,(;?1(:/7#'"#;<(7<(
",#&'(:(021%19#&1%(02#.2#;<(,<,;1/C(:&%(.=122#%1,(:(0:2;#8"$:2(,."281(,1;(:,(21Z"#21%G
Gradle
X(:(7"#$%(;..$@#;(;?:;(:$$.A,(:(%1=1$.012(;.(%19#&1(:&%(/:&:'1(/"$;#0$1(7"#$%(
8.&9#'"2:;#.&,
Android plugin for Gradle A.2@,(A#;?(H2:%$1(;.(02.=#%1(02.81,,1,(
:&%(8.&9#'"2:7$1(,1;;#&',(,018#9#8(;.(7"#$%#&'(:&%(;1,;#&'()&%2.#%(:00,
3
-:&(,018#9<c
!"#$%(;<01,C(02.%"8;(9$:=."2,C(7"#$%(=:2#:&;,
T:&#91,;(1&;2#1,
[101&%1&8#1,
>#'&#&'
*2.H":2%
T"$;#W)*+(,"00.2;
3
4"&,(8./0#$12
3
X(8?18@,(8.%1(,<&;:6C(;?1&($#&@,(0:8@:'1,(;';(A#;?(:00C(;?1&('1&12:;1,(
1618";:7$1(8.%1(L.exeO
V";0";,(7<;1(8.%1(L,;%(9.2/:;(9.2(:$$(0$:;9.2/,O(#&(;?1(9.2/(.9(
8./0#$:;#.&("&#;,C(A?#8?(:21(;?1&($#&@1%(;.(21,."281,
>#'&,()*+(A#;?(%17"'521$1:,1(@1<,;.21
Build&configurations
>."281(,1;
3
X(:(,1;(.9(8.%1(U(21,."281,(,018#9#8(;.(;?1(7"#$%(8.&9#'"2:;#.&
T:#&(,."281(,1;
X(8.%1(:&%(21,."218,(8.//.&(;.(:$$(=12,#.&,(.9(<."2(:00
!"#$%(;<01,
3
X(%19#&1(812;:#&(02.012;#1,(H2:%$1(",1,(A?1&(7"#$%#&'(U(0:8@:'#&'(:00
M<0#8:$$<(8.&9#'"21%(9.2(%#99(,;:'1,(.9(%1=1$.0/1&;($#918<8$1
)&%2.#%(821:;1,(debug :&%(release 7<(%19:"$;
T",;(71(%19#&1%(;.(7"#$%(:00C(;?121(/",;(:$A:<,(71(:;($1:,;(h
§
release =12(.&$<(A?1&(0210:2#&'(:00(9.2(0"7$#8(21$1:,1
§
*2.%"8;(9$:=."2,
3
X(21021,1&;(%#99(=12,#.&,(.9(:00(;?:;(%1=1$.012,(/:<(&11%(;.(21$1:,1( ;.(
",12,(L1'G(9211C(0:#%O
-:&(71(8",;./#,1%(;.(",1(%#99(-U4(A?#$1(,?:2#&'(:&%(21",#&'(;?.,1(
8.//.&(;.(:$$(=12,#.&,
V0;#.&:$C(/",;(71(/:&":$$<(821:;1%
!"#$%(=:2#:&;,
3
X(82.,,W02.%"8;,(.9(7"#$%(;<01,(:&%(02.%"8;(9$:=."2,
I.;(8.&9#'"21%(%#218;$<C(7";(7<(8.&9#'"2#&'(;?1(7"#$%(;<01,(:&%(
02.%"8;(9$:=."2,(;?:;(9.2/(;?1/
R,1%(;.(7"#$%(%17"'(=12,(.9(02.%"8;(9$:=."2,(%"2#&'(%1=1$.0/1&;C(.2(
,#'&1%(21$1:,1(=12,(.9(02.%"8;(9$:=."2,(9.2(%#,;2#7";#.&
M..$7:2(7";;.&,
!.;?(0:2;(.9(%17"'(7"#$%(A?#8?(#,(#&;1&%1%(,.$1$<(9.2(;1,;#&'3
4"&
`.&Q;(1&':'1(A#;?(%17"''12
`?1&(8$#8@1%C(%17"'(=12(7"#$;(7<()&%2.#%(>;"%#.
3
[17"'
`#$$(1&':'1(A#;?(%17"''12
3
Week$12
M"1,%:<C( Pk(T:<(Pihl hhchP
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Significantly reduces the time taken to update your app with code and resource changes. Especially beneficial following smaller changes, such as tuning the position of a view. As rebuilding the whole app just to update that small change would be much more inefficient than just using instant. Implementation code of an existing method is changed. Instant run performs a hot swap which is extremely fast as neither the activity nor the app need to be restarted. Instant run performs a warm swap which restarts the current activity without restarting the app. Structural code is changed, such as indentations, static fields, method signatures, implemented interfaces, static initialisers. Instant run performs a cold swap which restarts the whole app to update these changes. App manifest, or resources referenced by the app manifest, are changed. Instant run cannot fully perform its desired function, as only run can properly update android system ui elements such as widgets or notifications.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers