A community member has associated this post with a similar question:
Invalid stack map table at instruction index 177: invokespecial Ljava/lang/IllegalArgumentException;
Only moderators can edit this content.
Errors from .net MAUI android binding project after adding reference
Android binding project successfully compiles without issues but the same project is referenced into maui project it throws compile time errors
These all errors are just warnings in native android studio project but in MAUI this warnings shows as errors
Invalid stack map table at instruction index 93: dup, error: The max stack height of 4 is violated when pushing initialized my.com.softspace.SSMobileUtilEngine.exception.SSError to existing stack of size 4. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 177: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 31: invokespecial Lmy/com/softspace/reader/internal/kernel/c;<init>(Z[B)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.c. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 497: invokespecial Lcom/discover/mpos/sdk/data/external/ApplicationCandidateData;<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLjava/util/List;)V, error: Unexpected attempt to initialize initialized com.discover.mpos.sdk.data.external.ApplicationCandidateData. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 34: invokespecial Lcom/discover/mpos/sdk/cardreader/config/TerminalConfiguration;<init>(Ljava/lang/String;Lcom/discover/mpos/sdk/cardreader/config/TerminalCapabilitiesQualifiers;Lcom/discover/mpos/sdk/cardreader/config/TerminalType;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V, error: Unexpected attempt to initialize initialized com.discover.mpos.sdk.cardreader.config.TerminalConfiguration. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 176: invokespecial Lcom/mastercard/terminalsdk/utility/ByteArrayWrapper;<init>([B)V, error: Unexpected attempt to initialize initialized com.mastercard.terminalsdk.utility.ByteArrayWrapper. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 1036: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 15: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 109: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 21: invokespecial Ljava/lang/RuntimeException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.RuntimeException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 55: ifne L?, error: Could not assign '[uninitialized new, uninitialized new, int]' to '[Initialized(java.lang.IllegalArgumentException), Initialized(java.lang.IllegalArgumentException), int]'. The stack value at index 0 (from top) with 'uninitialized new' not being assignable to 'Initialized(java.lang.IllegalArgumentException)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 52: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 9: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 188: invokespecial Landroid/nfc/TagLostException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized android.nfc.TagLostException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 175: ifne L?, error: Could not assign '[uninitialized new, uninitialized new, int]' to '[Initialized(com.mastercard.terminalsdk.exception.L1RSPException), Initialized(com.mastercard.terminalsdk.exception.L1RSPException), int]'. The stack value at index 0 (from top) with 'uninitialized new' not being assignable to 'Initialized(com.mastercard.terminalsdk.exception.L1RSPException)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicatorManager$NfcConnectStatus;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicatorManager$NfcConnectStatus. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 16: invokespecial Lmy/com/softspace/reader/internal/kernel/PaymentNetwork;<init>(Ljava/lang/String;ILjava/lang/String;)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.PaymentNetwork. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/kernel/ConfigurationBaseKernel$Type;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.ConfigurationBaseKernel$Type. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 14: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 42: invokespecial Lmy/com/softspace/reader/internal/kernel/Tags;<init>(Ljava/lang/String;ILjava/lang/String;)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.Tags. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 21: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicator$ConnectStatus;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicator$ConnectStatus. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 54: ifne L?, error: Could not assign '[Initialized(my.com.softspace.reader.internal.kernel.eftpos.EFTPOSHandler), uninitialized new, uninitialized new, Initialized(java.lang.String[]), Initialized(java.lang.String[]), int]' to '[Initialized(my.com.softspace.reader.internal.kernel.eftpos.EFTPOSHandler), Initialized(java.util.ArrayList), Initialized(java.util.ArrayList), Initialized(java.lang.String[]), Initialized(java.lang.String[]), int]'. The stack value at index 1 (from top) with 'uninitialized new' not being assignable to 'Initialized(java.util.ArrayList)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 20: invokespecial Lmy/com/softspace/reader/internal/kernelconfig/Tag$TagType;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernelconfig.Tag$TagType. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 37: invokespecial Lmy/com/softspace/reader/internal/kernelconfig/Tag$TagClass;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernelconfig.Tag$TagClass. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicatorManager$NfcType;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicatorManager$NfcType. In later version of R8, the method may be assumed not reachable.
Contacted native developer he said his project do not support fully R8 mode. So it's just warnings but in MAUI it stops compiling by errors . Can you please help to make the MAUI app successfully compile