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

  • Question

  • User364073 posted

    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:

    1.
        <selector xmlns:android="...">
            <item android:state_enabled="true" android:state_pressed="false">
                <shape android:shape="oval">
                    <solid android:color="#00c853"/>
                </shape>
            </item>
            <item android:state_enabled="false">
                <shape android:shape="oval">
                    <solid android:color="#bdf1d2"/>
                </shape>
            </item>
            <item android:state_pressed="true">
                <shape android:shape="oval">
                    <solid android:color="#02903d"/>
                </shape>
            </item>
        </selector>
    2.
        <shape xmlns:android="..."
        android:innerRadiusRatio="1"
      android:shape="rectangle" >
    
      <solid android:color="#d0ffffff" />
      <corners android:radius="8dp" />
      <stroke
            android:width="2dp"
            android:color="@color/white"/>
      <padding
              android:left="10dp"
              android:top="10dp"
              android:right="10dp"
              android:bottom="10dp" />
    </shape>
    
    3.
        <shape xmlns:android="...">
              <solid android:color="#D3D3D3" />
        </shape>    
    4.
        <shape xmlns:android="..."
               android:shape="rectangle" >  
          <stroke
            android:width="2dp"
            android:color="#C6C6C6" />  
        </shape>    
    

    Target build android version is that Nougat 7.1 android:targetSdkVersion="25"

    Thursday, December 28, 2017 10:41 AM

All replies

  • User327754 posted

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

    Friday, December 29, 2017 4:32 PM
  • User364073 posted

    Change the target version or update firmware android?

    Friday, December 29, 2017 7:46 PM
  • User150697 posted

    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

    Sunday, January 14, 2018 4:40 PM
  • User364073 posted

    Thanks, but I already solved my problem it was due to another error https://forums.xamarin.com/discussion/114649/error-the-file-obj-debug-android-bin-packaged-resources-does-not-exist#latest

    Sunday, January 14, 2018 5:29 PM
  • User307736 posted

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

    Friday, July 26, 2019 10:11 AM
  • User383612 posted

    @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...

    Tuesday, August 27, 2019 7:17 AM