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

Android Studio の気になる warnings を抑制する方法まとめ

Android Studio の気になる warnings を抑制する方法まとめ

Gotanda.mobile #2 in VASILY で発表した資料です。
https://gotandamb.connpass.com/event/50876/

Pine Mizune

March 23, 2017
Tweet

More Decks by Pine Mizune

Other Decks in Programming

Transcript

  1. 1JOF .J[VOF  .BS   (PUBOEBNPCJMF  JO 7"4*-:

    "OESPJE 4UVEJP ͷؾʹͳΔ XBSOJOHT Λ ཈੍͢Δํ๏·ͱΊ
  2. ࣗݾ঺հ v (JU)VC !QJOF v 5XJUUFS !QJOF v גࣜձࣾωΫετϏʔτ JO

    ޒ൓ా v (PUBOEBNPCJMFKT 0SHBOJ[FS v ֆจࣈδΣωϨʔλʔ "VUIPS
  3. ֓ཁ "OESPJE ͷ։ൃͰΑ͋͘Δ XBSOJOHT ͱ ͦͷ XBSOJOHT Λ ཈੍͢Δํ๏ Λ·ͱΊ·ͨ͠ɻ

    ແବʹπʔϧʹౖΒΕͳ͍ շదͳ։ൃ؀ڥ Λ࡞Γ·͠ΐ͏ɻ
  4. ͳͥ XBSOJOHT Λ཈੍͢Δͷ͔  ରԠ͠ͳͯ͘΋ྑ͍ XBSOJOHT Ͱ͋ΔͨΊ o ࢦఠࣗମ͕ؒҧ͍ͬͯΔ ޡݕ஌

    o ϓϩμΫτతʹରԠͷඞཁੑ͕ബ͍  BCPSU0O&SSPS Λઃఆ͢Δํ਑ͳ৔߹ o XBSOJOHT ΛରԠ͢Δ͔ɺແࢹͤ͞Δ͔ͷೋ୒  ؾʹͳΔ͔Β ˡରԠ͢Δͱਫ਼ਆӴੜ্ྑ͍
  5. XBSOJOHT Λ཈੍͢Δʹ͸  ϑΝΠϧ୯ҐͰແࢹͤ͞Δ o XBSOJOHT ֘౰Օॴʹແࢹͤ͞Δهड़Λߦ͏ o ίʔυࣗମ͕৑௕ʹͳΔͷ͕σϝϦοτ 

    ϓϩδΣΫτ୯ҐͰແࢹͤ͞Δ o ϓϩδΣΫτશମͷઃఆ ྫ CVJMEHSBEMF ʹهड़ o XBSOJOHT ࣗମʹؾ͚ͮͳ͘ͳΔͷ͕σϝϦοτ
  6. ϑΝΠϧ୯Ґ +BWB  ,PUMJO ϑΝΠϧ OFWFS VTFE EFQSFDBUFE ద੾ͳΞϊςʔγϣϯΛ෇͚·͠ΐ͏ q݁࿦

    @SuppressWarnings("unused") @SuppressWarnings("deprecation") ࢀߟ IUUQLVSSZUSBOCMPHTQPUKQBOESPJETUVEJPMJTUPGTVQQSFTTXBSOJOHIUNM
  7. ϓϩδΣΫτ୯Ґ XBSOJOHT ࣗମΛແޮԽ͢Δ "OESPJE -JOU ͷઃఆͰແޮԽ͠·͠ΐ͏ q݁࿦ 3JHIU UP -FGU

    TVQQPSUT ͦ΋ͦ΋೔ຊͰ͔͠ϦϦʔε͠ͳ͍ʜ lintOptions { disable 'RtlHardcoded' } JO CVJMEHSBEMF ࢀߟ IUUQLVSSZUSBOCMPHTQPUKQBOESPJETUVEJPMJTUPGTVQQSFTTXBSOJOHIUNM
  8. ϓϩδΣΫτ୯Ґ XBSOJOHT ݕग़ͷݪҼΛઈͭ XBSOJOHT ݕग़࣌ͷઃఆͰ཈੍Ͱ͖Δ৔߹͕͋Δ q݁࿦ VOVTFE Ξϊςʔγϣϯܦ༝Ͱݺͼग़͞ΕΔʜ <component name="EntryPointsManager">

    <entry_points version="2.0" /> <list size="1"> <item index="0” class="java.lang.String” itemvalue="butterknife.OnClick" /> </list> </component> JO JEFBNJTDYNM