0

I'm having this problem when trying to launch my first activity. It's working fine on Android 5.0 but lower than that I'm receiving that problem.

7-16 08:23:22.499  16265-16265/com.diofeher.App E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.diofeher.App, PID: 16265
java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$attr
    at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:289)
    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
    at com.diofeher.App.LoginActivity.onCreate(LoginActivity.java:56)
    at android.app.Activity.performCreate(Activity.java:5231)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
    at android.app.ActivityThread.access$800(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5001)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    at dalvik.system.NativeStart.main(Native Method)

Here is my gradle file: (appcompat is the first one :()

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:design:22.2.0'
    compile 'com.android.support:recyclerview-v7:22.0.0'
    compile 'com.android.support:cardview-v7:22.0.0'
    compile 'com.android.support:multidex:1.0.0'
    compile project(':libs:android-support-v4-preferencefragment')
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'br.com.liveo:navigationdrawer-material:2.3.4'
    compile 'com.koushikdutta.ion:ion:2.0.0'
    compile 'com.rengwuxian.materialedittext:library:2.0.3'
    compile 'com.afollestad:material-dialogs:0.6.7.2'
    compile 'com.google.code.gson:gson:2.3'
    compile 'com.roomorama:caldroid:1.1.8'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'
    compile 'com.splunk.mint:mint:4.2'
    compile 'com.mobsandgeeks:android-saripaar:2.0-SNAPSHOT'
    compile('com.github.ganfra:material-spinner:1.1.0') {
        exclude group: 'com.nineoldandroids', module: 'library'
    }
    compile('com.github.florent37:materialviewpager:1.0.4@aar') {
        transitive = true
    }
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile 'me.grantland:autofittextview:0.2.0'
    compile 'com.jakewharton:butterknife:7.0.1'

    //    BILLING
    compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
}

Tried to rebuild but no luck for me :(

diofeher
  • 395
  • 3
  • 12

1 Answers1

0

Getting exception : java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14

Used the answer in this question to solve my problem.

Changed from:

compile 'com.google.android.gms:play-services:7.5.0'

to:

compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
Community
  • 1
  • 1
diofeher
  • 395
  • 3
  • 12