This is my first attempt at Xamarin, just running through the examples at Xamarin.com.
But I'm getting this error when I try to build. It's strange because I can select the icon from the list on the properties tab but VS can't find them during the build.
I've tried moving the files so the path is really short.
I've tried adding new icons with differnt names and selecting them in the properties page.
Neither of these worked.
The AndroidManifest.xml file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Phoneword.Phoneword" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<!--suppress UsesMinSdkAttributes-->
<uses-sdk android:minSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:allowBackup="true" android:label="Phoneword" android:icon="@mipmap/Icon" android:name="android.app.Application" android:debuggable="true">
<activity android:label="Phone Word" android:name="md5eb8cee9bb2852617ab2e56c7bf729ae8.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="Phoneword.Phoneword.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.Phoneword.Phoneword" />
</intent-filter>
</receiver>
</application>
</manifest>
Here's a workaround. Go into assemblyinfo.cs (it's in the Properties folder in your project) and add the following line in there:
[assembly: Application(Icon = "@mipmap/icon")]
The solution:
- Change all "Icon.png" names into mipmap folders to "icon.png".
- Clean project
- Re-open Visual Studio
- Select "@mipmap/icon" in "Application Icon" in AndroidManifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With