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

后端 未结 5 1574
粉色の甜心
粉色の甜心 2020-11-27 22:03

i am using terminal [not eclipse]. i got following exception error, while i use emulator.debug successfully and installd successfully. But emulator show

相关标签:
5条回答
  • 2020-11-27 22:37

    If you are using eclipse than just import the v7 compat library project into your work space and add it as a library to your project. Else if you are doing it from terminal than what you can do is put android-support-v7-appcompat library project (which you can find in sdk\extras\android\support\v7\appcompat) in the same directory where is your project and add this line to your project.properties file.

    android.library.reference.1=../android-support-v7-appcompat
    

    Do not forget to add both jar files v4, v7 to your project as well.

    0 讨论(0)
  • 2020-11-27 22:45

    AppCompat is a lib with resource. You cannot add the jar, cause this library uses resources. So you need to add a library project.

    Follow Adding Support Libraries steps.

    0 讨论(0)
  • 2020-11-27 22:51
    1. Right-click the your project folder and select java Build Path >Libraries

    2. whether .jar file of your library project is present or not

    3. if not buld the correct path that contains .jar file

    0 讨论(0)
  • 2020-11-27 22:55

    Make sure to do the following (from Support Library Setup):

    1. Right-click the library project folder and select Build Path > Configure Build Path.

    2. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.

    3. Uncheck Android Dependencies.

    0 讨论(0)
  • 2020-11-27 22:59

    If you are using Android Studio then its quick easier, Please add compile 'com.android.support:cardview-v7:21.+' in dependencies in build.gradle.

    dependencies {
           compile 'com.android.support:cardview-v7:21.+'
    }
    
    0 讨论(0)
提交回复
热议问题