Exception java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable

后端 未结 5 684
长发绾君心
长发绾君心 2021-01-12 18:39

Hi all I am getting a exception while working with support lib. I know lot of question and answer are available in SO but no one work for me

11-27 11:58:15.4         


        
相关标签:
5条回答
  • 2021-01-12 18:57

    The problem seems wider, but in my particular case it was caused by clashing between the following dependencies in build.gradle

    compile 'com.facebook.android:facebook-android-sdk:3.21.1'
    
    compile 'com.google.android.gms:play-services-plus:7.5.0'
    
    0 讨论(0)
  • 2021-01-12 19:04

    Try to import v7 appcompat with resources for your project rather than directly using .jar file.

    Here is the link for importing appcompat with resources - https://developer.android.com/tools/support-library/setup.html

    If you come across problems in your project after importing v7 appcompat, cross check target sdk version in manifest and set the target sdk version to the latest sdk api version.

    Hope this helps !!

    0 讨论(0)
  • 2021-01-12 19:05

    In "android-support-v7-appcompat" project:

    -Delete “android-support-v7-appcompat” from Package explorer.
    -Import again and check “Copy into workspace”
    -In Properties -> Android -> in Project build target, uncheck Android 2.2 and check Android 4.1.2
    -In Java build path, uncheck if you have any .jar library, and uncheck the Dependence
    

    and finally this is what you need to do. enter image description here

    0 讨论(0)
  • 2021-01-12 19:15

    You have to just delete your appcompat and re-import it to eclipse and change its android built property to highest api configuration. Clean your project, copy-paste R file in gen package and change project build path to highest api level like api-21.

    This will solve your problem.

    0 讨论(0)
  • 2021-01-12 19:18

    Import the support.v7.appcompat as a library project in your workspace and attach it with your project.

    Try this,it will work for sure. if you still face any issue, do comment.

    0 讨论(0)
提交回复
热议问题