Exclude support v4 in gradle to remove duplicate but getting java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14 -


i have old eclipse based project , , converted android studio based. convertion success, have problem when adding other dependency, first error java.exe finished non-zero exit value 2, because of duplicate dependency support v4, , try exlude modul support v4, im getting java.lang.noclassdeffounderror: android.support.v7.app.appcompatdelegateimplv14 build.gradle:

dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile project(':slidingmenu')     compile project(':photoview')     compile project(':viewpager')     compile project(':stackblur')     compile project(':facebooksdk')     compile files('libs/liballshareinterface_2.0.0.jar')  //        exclude module support-v4 remove duplicate     compile ('com.android.support:appcompat-v7:22.2.0') { exclude module: 'support-v4' }     compile('com.android.support:design:22.2.0') { exclude module: 'support-v4' }     compile('com.squareup.picasso:picasso:2.5.2') { exclude module: 'support-v4' }     compile('com.android.support:recyclerview-v7:21.0.0') { exclude module: 'support-v4' }     compile('com.android.support:cardview-v7:22.2.0') { exclude module: 'support-v4' }     compile('com.android.support:support-annotations:22.2.0') { exclude module: 'support-v4' }  } 

any appreciated

well although not gradle expert , i'm experiencing problems myself, able reproduce error complaining appcompat-v4, using dependencies.

it seems excluding support-v4 dependencies, , since support-v4 required, must either specify dependency separately, or change this:

compile ('com.android.support:appcompat-v7:22.2.0') { exclude module: 'support-v4' } 

to this:

compile ('com.android.support:appcompat-v7:22.2.0') 

so don't exclude support-v4 project.

i did second , project build (a sample project dependencies defined).


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -