解決 No resource found that matches the given name (at 'icon' with value '@drawable/icon') 問題


新解決方案Xamarin的Android項目在項目屬性

換圖標后 會出現 No resource found that matches the given name (at 'icon' with value '@drawable/icon'). 錯誤

解決方法是 

修改 包含 MainLauncher = true 的 Activity 

    [Activity(Label = "LayoutTest", MainLauncher = true, Icon ="@drawable/icon")]// "@drawable/icon")]
    public class MainActivity : Activity
    { 
}

注意無論你的icon.png圖片在drawable,drawable-ldpi,drawable-mdpi,drawable-hdpi或者在項目下(文件生成操作為:內容,非AndroidResource)

都是

Icon ="@drawable/icon" 目前此方法運行正常,由於初學更深的原理不知


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM