我正在使用Mac OS來開發Android應用。我無法生成apk文件。無法加載Android應用徽標
錯誤:
Error:(14) Error: Unexpected resource reference type; expected value of type @string/ [ReferenceType]
我的XML文檔中的代碼:
<string name="icon_name">@mipmap/ic_lau_spt</string>
爲什麼會產生這個錯誤嗎?
我正在使用Mac OS來開發Android應用。我無法生成apk文件。無法加載Android應用徽標
錯誤:
Error:(14) Error: Unexpected resource reference type; expected value of type @string/ [ReferenceType]
我的XML文檔中的代碼:
<string name="icon_name">@mipmap/ic_lau_spt</string>
爲什麼會產生這個錯誤嗎?
生成該錯誤,因爲你的XML項目是一個字符串
<string name="icon_name">@mipmap/ic_lau_spt</string>
^ ^
,如果你想給它加載的應用程序標識(顯示在此圖像您的引用是一個資源/圖像
應用程序的抽屜) 搜索這個
android:icon="@mipmap/ic_launcher"
在您的Android清單和替換您的圖像ic_launcher
在AndroidManifest.xml中
你定義在裏面的應用程序標記您的manifest.xml文件的應用程序圖標
<application
android:icon="@mipmap/ic_launcher">
</application>
是的。我已經定義了這一點。 – Melissa
只需從你的strings.xml文件中刪除「
把
<manifest
<application
android:icon="@mipmap/ic_launcher">
</application>
</manifest>
什麼可以放呢? – Melissa
你想在哪裏顯示圖像? – Malik
其應用程序徽標。 – Melissa