2017-10-05 34 views
1

我試過Android8.0自適應圖標。 但我抓到皮棉錯誤以下...林特放棄使用時自適應圖標

src/main/res/mipmap-anydpi-v26/ic_launcher.xml: Error: 
Launcher icons must be in PNG format [IconLauncherFormat] 


Explanation for issues of type "IconLauncherFormat": 
Launcher icons should be in the PNG format. This requirement is enforced by 
the The Google Play Developer Console. 

https://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html#size 

如何解決這個問題? 只能用LintOption禁用它嗎?

請幫忙。謝謝。

+1

也許你只需要將Android Studio和Android插件更新到3.0.0即可。 – natario

+0

謝謝! 「圖標啓動器格式」在AS3.0中被禁用。 在AS3.0中被抑制時發生錯誤。 – yuki312

回答

0

你必須把它添加到您的應用/的build.gradle文件,在機器人部分:

lintOptions { 
    lintConfig file("lint.xml") 
} 

,然後創建一個包含以下內容的文件app/lint.xml:

<lint> 
    <issue id="IconLauncherFormat"> 
     <ignore path="src/main/res/mipmap-anydpi-v26/ic_launcher.xml" /> 
    </issue> 
</lint>