1
這是我第一次嘗試開發Android應用程序。我有兩次發生同樣的錯誤(第5行和第13行),但我不知道我做錯了什麼。找不到與指定名稱匹配的資源(位於'icon',值爲'@ drawable/ic_launcher')
的錯誤:「沒有資源的發現,給定名稱(在‘圖標’,值爲‘@繪製/ ic_launcher’匹配
的問題是,我確實有ic_launcher.png保存在資源>繪製。請幫助
Android清單文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Solobuy.Solobuy">
<uses-sdk android:minSdkVersion="19" />
<application android:label="Solobuy" android:icon="@drawable/ic_launcher" android:name="mono.android.app.Application" android:debuggable="true">
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="Solobuy.Solobuy.mono.MonoRuntimeProvider.__mono_init__" />
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.Solobuy.Solobuy"/>
</intent-filter>
</receiver>
<activity android:icon="@drawable/ic_launcher" android:label="Items" android:name="solobuy.ItemsActivity" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="Solobuy.Solobuy.mono.MonoRuntimeProvider.__mono_init__" />
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.Solobuy.Solobuy" />
</intent-filter>
</receiver>
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="Solobuy.Solobuy.mono.MonoRuntimeProvider.__mono_init__" />
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.Solobuy.Solobuy" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
嘗試清理你的項目或重新啓動你的ide? – zgc7009
把你的圖標放到'Project name-res-drawable'並清理你的項目。 – Lazy
哦nvm。這沒有用:/。調試後出現同樣的錯誤我不確定你的意思是把我的圖標放到Project name-res-drawable Lazy – Learnin2Code