question

RonaldGANS-4488 avatar image
0 Votes"
RonaldGANS-4488 asked RonaldGANS-4488 commented

When building I now get this:@mipmap-mdpi/myicon' is incompatible with attribute icon (attr) reference

Where do I look and how do I fix it?

dotnet-xamarin
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please share [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)] above your MainActivity.cs and code in the AndroidManifest.xml

0 Votes 0 ·

Am working on it now. What amazes me is how much more complex working with icons are on Android than on Windows.

I'm running the Icon Generator. But when I upload my PNG file, I don't see it on the screen.

0 Votes 0 ·

Sorry: Now it worked.

0 Votes 0 ·

I meant only that Icon Generator worked. I still get the same error.

0 Votes 0 ·

You can share Resources + the Manifest file, I will copy it to my demo and try to reproduce this issue.

0 Votes 0 ·

1 Answer

RonaldGANS-4488 avatar image
0 Votes"
RonaldGANS-4488 answered RonaldGANS-4488 commented

I find this very confusing:

<?xml version="1.0" encoding="utf-8"?>
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="Emmanuel" package="com.yullencryption.alkemi" android:installLocation="internalOnly" android:versionCode="163920414">
    <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="30" />
    <uses-permission android:name="android.permission.INTERNET" />
    <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="Alkemi" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:name="android.app.Application" android:debuggable="true">
      <activity android:icon="@mipmap/myicon" android:label="Alkemi 5.4 8-9-21" android:theme="@style/AppTheme" android:name="crc640c4af4427b41534c.MainActivity">
        <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <service android:name="crc64a98abb514ffad9f1.KeepAliveService" />
      <receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="crc64a0e0a82d0db9a07d.BatteryBroadcastReceiver" />
      <receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="crc64a0e0a82d0db9a07d.EnergySaverBroadcastReceiver" />
      <receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="crc64a0e0a82d0db9a07d.ConnectivityBroadcastReceiver" />
      <provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.yullencryption.alkemi.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.com.yullencryption.alkemi" />
        </intent-filter>
      </receiver>
    </application>
    <queries>
      <package android:name="Mono.Android.DebugRuntime" />
      <package android:name="Mono.Android.Platform.ApiLevel_30" />
    </queries>
  </manifest>


Why SEPPUKU? What is "Essentials Battery Broadcast Receiver? I think I never really examined the Manifest file before. This is all very weird.

· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you use Xamarin.Essentials: Battery in your project? If so, it is generated automatically by Xamarin.Essentials.


0 Votes 0 ·

I am going to stop now. I will resume my suffering tomorrow. THANKS!

0 Votes 0 ·

I've never even heard of it.

0 Votes 0 ·

This is the error I get:

Severity Code Description Project File Line Suppression State
Error resource mipmap/myicon (aka com.yullencryption.alkemi:mipmap/myicon) not found. Alkemi6302019-1 P:\Android\Alkemi20.10-WithYull(9252019)-4.0\Alkemi6302019-1\obj\Release\100\android\manifest\AndroidManifest.xml 7

0 Votes 0 ·

Just so you know, so far you are in good company. I've tried 6 different places to get help and no one and I mean NO ONE has a clue what to do.

0 Votes 0 ·

You can create a new demo(Keep the project pure), to add Launcher icon generator's icon following steps from my previous link.

0 Votes 0 ·

It all works just fine now. I had to add that myicon file to the Resources (Add Existing). Oddly, even though it didn't appear in Solution Explorer, that made it work.

0 Votes 0 ·

Great, Thanks for your sharing.

0 Votes 0 ·

Just to be clear I greatly appreciate your attempts to help me. I reached out to many others as well. Again thanks!!!

0 Votes 0 ·

You are welcome, if this issue was solved, could you share a answer about solving this issue?(this thread as well https://docs.microsoft.com/en-us/answers/questions/506575/how-to-change-app39s-icon.html), it will help others who have similar issue.

0 Votes 0 ·