Forum Xamarin.Android

Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$drawable;

FotalFotal Member ✭✭✭

Hi, when starting the application, when it was already compiled, an exception occurs: Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$drawable. As I understand it, R$drawble means a style folder in which there are 4 styles, but their change did not lead to anything or I did not do it right?

These are the styles:

    <selector xmlns:android="...">
        <item android:state_enabled="true" android:state_pressed="false">
            <shape android:shape="oval">
                <solid android:color="#00c853"/>
        <item android:state_enabled="false">
            <shape android:shape="oval">
                <solid android:color="#bdf1d2"/>
        <item android:state_pressed="true">
            <shape android:shape="oval">
                <solid android:color="#02903d"/>
    <shape xmlns:android="..."
  android:shape="rectangle" >

  <solid android:color="#d0ffffff" />
  <corners android:radius="8dp" />
          android:bottom="10dp" />

    <shape xmlns:android="...">
          <solid android:color="#D3D3D3" />
    <shape xmlns:android="..."
           android:shape="rectangle" >  
        android:color="#C6C6C6" />  

Target build android version is that Nougat 7.1


  • Ahsan_SiddiqueAhsan_Siddique PKMember ✭✭✭✭

    You need to upgrade your android version because AppCompat version is upgraded and now targeting 8.0 android version.

  • FotalFotal Member ✭✭✭

    Change the target version or update firmware android?

  • BenoistLUGNIERBenoistLUGNIER FRMember ✭✭

    Juste upgrade the compile using android version (droid projet properties -> Application)
    I just upgrade from 6.0 to 8.0 and it compile and run fine

  • NickKovalskyNickKovalsky USMember ✭✭✭

    Just created a new project from vs template, copied everything there and then it worked.. 100 000 other solutions didn't work.

  • zerokewl88zerokewl88 Member ✭✭

    @Fotal said:
    Thanks, but I already solved my problem it was due to another error

    Hi, i'm glad you solved your issue and moved on. But i'm also finding this exact same issue after following the same steps you have mentioned above - could you please be so kind if you can remember, how did you resolve this?

    I am receiving what i think is a similar error message after Creating a Binding Library, adding a JAR, and then setting the resource type to EmbeddedJar and building it + referencing it from a Xamarin Droid project.

    e = {Java.Lang.ExceptionInInitializerError: Exception of type 'Java.Lang.ExceptionInInitializerError' was thrown. ---> Java.Lang.NoClassDefFoundError: Failed resolution of: Lcom/techcompany/lang/NTypes; ---> Java.Lang.ClassNotFoundException: Didn't find class "com...

Sign In or Register to comment.