1

There is a problem in my android app.When I run it works fine up to showing initial splash screen after that, The application get terminated by showing this error

D/Error: ERR: exClass=java.lang.ClassNotFoundException
D/Error: ERR: exMsg=Didn't find class "android.support.v7.app.AppCompatDelegateImplV7" on path: DexPathList[[dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-universal-image-loader-1.9.3_2e43e3c9ab19d582dc42c3f097ec207646369502-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-nineoldandroids-2.4.0_c7e97c88f2b4c03d5b018314d7e0360b569d2fe1-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-listviewanimations_lib-manipulation_3.1.0_3ea7d78cb8c9d162b8cf20f91d41b56d8350ede6-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-listviewanimations_lib-core_3.1.0_d5b6f2edc013f81d2d7c430ea57e27009918d720-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-listviewanimations_lib-core-slh_3.1.0_68ff82cc1f3aa9efe269eb0ef51c87fce55e43d3-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-json-simple-1.1_d6065e905baed35220996afac35ab5d2effc7d1b-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-httpmime-4.3_c806319611d02c1db14d0f99820609207c97b64f-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-httpcore-4.3_c75b97ba5d8ce326b7ae8acc4a0c67e27dd681e6-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-google-api-services-youtube-v3-rev137-1.20.0_16b6a7cef68d066c74e8cce7ff54b7c6e6d18564-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.mcxiaoke.volley-library-aar-1.0.0_442b26a71dcf49f1326a59f7dd93b5abcc40808f-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.google.android.gms-play-services-tasks-9.2.1_49e1e9f411b0d0f2c0d9750b776a6e724b71f888-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-9.2.1_16e20869c8c618f93d5db229381552d887ceb8a9-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.google.android.gms-play-services-base-9.2.1_be65c630d67721aa9baf669ad5365aef43eda2f6-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.google.android.gms-play-services-auth-base-9.2.1_7f3fe4c347fe9ee24a2b0a4f8177bcae73bdf43c-classes.dex", dex file "/data/data/thaikkudambridge.kodspider.com.thaikkudambridge/files/instant-run/dex/slice-com.google.android.gms-play-services-auth-9.2.1_c3cef
D/Error: ERR: file=BaseDexClassLoader.java
D/Error: ERR: class=dalvik.system.BaseDexClassLoader
D/Error: ERR: method=findClass line=56
D/Error: ERR: stack=java.lang.NoClassDefFoundError: Failed resolution of: 
Landroid/support/v7/app/AppCompatDelegateImplV7;

This is my build gradle file code

apply plugin: 'com.android.application'

 dependencies {
compile fileTree(dir: 'libs', include: '*.jar')

compile project(':StickyListHeaders')
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.support:appcompat-v7:22.1.1'   
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile "org.apache.httpcomponents:httpcore:4.2.4"
compile ("org.apache.httpcomponents:httpmime:4.3")
compile 'com.android.support:multidex:1.0.1'
 }

 android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
    }


    defaultConfig {
    minSdkVersion 14 //lower than 14 doesn't support multidex
    targetSdkVersion 21
    // Enabling multidex support.
    multiDexEnabled true   }

  configurations {
    all*.exclude group: 'com.android.support', module: 'support-v4'
    all*.exclude group: 'com.android.support', module: 'support-annotations'
   }

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
    abortOnError false
}
sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }

    // Move the tests to tests/java, tests/res, etc...
    instrumentTest.setRoot('tests')

    // Move the build types to build-types/<type>
    // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
    // This moves them out of them default location under src/<type>/... which would
    // conflict with src/ being used by the main source set.
    // Adding new build types or product flavors should be accompanied
    // by a similar customization.
    debug.setRoot('build-types/debug')
    release.setRoot('build-types/release')
}
}

How can I fix it

These are the libraries that I use

android-support-v4.jar
google-api-services-youtube-v3-rev137-1.20.0.jar
listviewanimations_lib-core-slh_3.1.0.jar
listviewanimations_lib-core_3.1.0.jar
listviewanimations_lib-manipulation_3.1.0.jar
nineoldandroids-2.4.0.jar
universal-image-loader-1.9.3.jar
volley-1.0.0-sources.jar
YouTubeAndroidPlayerApi.jar
user1810
  • 121
  • 1
  • 2
  • 10

1 Answers1

-1

Disable your instant run in your android studio

File->Settings->Build,Execution,Deployment->Instant Run->Uncheck First Checkbox

Clean and rebuild your project and then run.

Sallu
  • 141
  • 3
  • 17
  • It works only one time and crashed when I tried to login.Second time another was found while running – user1810 May 08 '17 at 06:51
  • This is that error java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/AppCompatDelegateImplV7; – user1810 May 08 '17 at 06:52
  • @user1810 add this in your build.gradle compile 'com.android.support:appcompat-v7:21.0.0-rc1' instead of compile 'com.android.support:appcompat-v7:22.1.1' because your compiled sdk version is 21 – Sallu May 08 '17 at 07:05
  • syn failed on adding that library – user1810 May 08 '17 at 07:14