Unable to merge dex Android - android

I am getting error Unable to merge dex, try everything on stackoverflow
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
flatDir {
dirs 'libs'
}
mavenCentral()
}
def daggerVersion = '2.8'
android {
compileSdkVersion 28
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.upliftapp"
minSdkVersion 21
targetSdkVersion 28
versionCode 39
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "en"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// shrinkResources = true
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.2'
//force 'com.android.support:support-v4:27.1.0'
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
aaptOptions {
cruncherEnabled false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.twitter.sdk.android:twitter:1.14.1#aar') {
transitive = true;
}
compile('com.twitter.sdk.android:tweet-composer:1.0.5#aar') {
transitive = true;
}
compile project(':ViewPagerIndicator-Library')
compile project(':library_imageloading')
compile project(':ShortcutBadgerLib')
compile project(':CircleProgressView')
compile project(':StickyHeaderLibrary')
compile project(':VideoLibtoro')
compile project(':token_textview_library')
compile project(':swap_lib')
compile project(':library_parallaxeffect')
compile project(':curton_library')
compile project(':fullscreenvideoview')
compile project(':android-volley-master')
compile 'com.github.clans:fab:1.6.4'
compile "com.android.support:appcompat-v7:28.+"
compile 'com.android.support:design:28.+'
compile 'com.android.support:cardview-v7:28.+'
compile 'com.android.support:support-v4:28.+'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.android.support:recyclerview-v7:28.+'
compile 'com.facebook.fresco:fresco:0.9.0'
compile 'com.mixpanel.android:mixpanel-android:4.+'
compile 'com.facebook.android:facebook-android-sdk:4.35.0'
compile 'com.crittercism:crittercism-android-agent:+'
compile 'com.google.android.gms:play-services-base:+'
implementation 'com.google.android.gms:play-services-maps:+'
implementation 'com.google.android.gms:play-services-appindexing:+'
compile 'com.orhanobut:logger:1.15'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
/*compile 'com.amazonaws:aws-android-sdk-s3:2.2.+'
compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'*/
compile 'com.amazonaws:aws-android-sdk-s3:2.+'
compile 'com.amazonaws:aws-android-sdk-core:2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.+'
compile 'com.google.code.gson:gson:2.6.2'
compile 'net.ypresto.androidtranscoder:android-transcoder:0.1.10'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.instabug.library:instabug:8.0.13'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
compile 'com.github.stfalcon:frescoimageviewer:0.4.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.etsy.android.grid:library:1.+'
compile 'com.jpeng:LoadingProgress:1.1.0'
compile 'com.theartofdev:fast-image-loader:0.8.+'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'in.srain.cube:ultra-ptr:1.0.11'
testCompile 'junit:junit:4.12'
compile project(':library_scrollable')
compile 'io.branch.sdk.android:library:2.+'
compile 'com.appsflyer:af-android-sdk:4+#aar'
compile 'com.vdurmont:emoji-java:3.1.3'
compile project(':bettervideoplayer')
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.8.0'
implementation project(':emojify_new')
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.github.nkzawa:socket.io-client:0.3.0'
implementation 'com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:2.0#aar'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-iid:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
error log
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Have you tried updaing your libraries? also drop the compile keyword and replace it with implementation

Related

Could not find com.google.dagger:dagger-compiler:3.0.0

I have imported project from Eclipse and I got so many errors and I resolved all of them now in the end after successful build, I'm getting error:
Could not find com.google.dagger:dagger-compiler:3.0.0
Code in build.gradle(project) is
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
and code in build.gradle(module:app) is
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.thanu.schoolbustracker"
minSdkVersion 24
targetSdkVersion 27
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
annotationProcessor 'com.google.dagger:dagger-compiler:3.0.0'
compile 'com.android.support:support-v4:27.0.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile files('libs/google-play-services.jar')
compile files('libs/maps.jar')
compile 'com.android.support:support-annotations:27.0.2'
compile 'com.android.support:support-v13:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:gridlayout-v7:27.0.2'
compile 'com.android.support:mediarouter-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:palette-v7:27.0.2'
compile 'com.android.support:leanback-v17:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:exifinterface:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.1.0'
compile 'com.android.support.test:runner:1.0.1'
compile 'com.android.support.test.espresso:espresso-core:3.0.2'
compile 'com.android.support.test.espresso:espresso-contrib:3.0.2'
compile 'com.android.databinding:library:3.1.2'
compile 'com.android.databinding:baseLibrary:3.1.2'
compile 'com.android.databinding:compiler:3.1.2'
compile 'com.android.databinding:adapters:3.1.2'
compile 'com.google.android.gms:play-services-ads:15.0.0'
compile 'com.google.android.gms:play-services-wearable:15.0.0'
compile 'com.google.android.gms:play-services-maps:15.0.0'
compile 'com.google.android.support:wearable:2.3.0'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
After rebuild, project is built successfully but it is not creating APK and giving error;
Could not find com.google.dagger:dagger-compiler:3.0.0
Right now the latest version of Dagger is 2.15, change this line:
annotationProcessor 'com.google.dagger:dagger-compiler:2.15'
Also other Dagger libraries are:
compile "com.google.dagger:dagger:2.15"
compile "com.google.dagger:dagger-android:2.15"
compile "com.google.dagger:dagger-android-support:2.15"
annotationProcessor "com.google.dagger:dagger-android-processor:2.15"

TransformException : java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/api/signin/zze.class

After updating the Firebase SDK to 11.8.0, I am getting that error.Please help me in resolving this.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
compile('com.github.ozodrukh:CircularReveal:1.3.1#aar') {
transitive = true;
}
}
android {
signingConfigs {
config {
keyAlias 'crm'
keyPassword 'autobiz'
storeFile file('D:/LatestProjects/LatestProjects/WyzProjects/WyzProjects/WYZCRM/wyzcrmKeystore/Keystore/WYZCRM.jks')
storePassword 'autobiz'
}
}
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.wyzcrm9013.wyzcrmapp"
minSdkVersion 16
targetSdkVersion 25
versionCode 2
versionName "1.5"
}
buildTypes {
debug {
debuggable = true as BuildType
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.config
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/maven/commons-io/commons-io/pom.xml'
exclude 'META-INF/maven/commons-io/commons-io/pom.properties'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('com.digits.sdk.android:digits:1.9.4#aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.afollestad.material-dialogs:core:0.9.0.1'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'com.github.mahmed8003:DroidValidatorLight:1.0.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.google.android.gms:play-services-gcm:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.github.ybq:Android-SpinKit:1.1.0'
compile 'com.jakewharton:butterknife:8.1.0'
apt 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.firebase:digitsmigrationhelpers:0.1.1'
compile 'com.firebaseui:firebase-ui-auth:2.0.0'
compile 'com.firebaseui:firebase-ui:0.4.4'
compile 'com.hbb20:ccp:1.7.2'
//compile 'com.google.android.gms:play-services-appindexing:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Let me know any changes need to be made. Prior to this I used 11.4.2 version, and it worked fine in all the devices.
The device which has Google play services with the version 11.9.52, this Am not getting FCM token.
Change this:
compile 'com.firebaseui:firebase-ui-auth:2.0.0'
compile 'com.firebaseui:firebase-ui:0.4.4'
to this:
compile 'com.firebaseui:firebase-ui-auth:3.2.1'
compile 'com.firebaseui:firebase-ui:3.2.1'
FirebaseUI Compatibility with Firebase/google play services

Failed to create MD5 hash for file 'F:\Projects\Table42\trunk\app\libs\appsee.jar'

Getting this error on run time for the application but compilation is succesfully.
ERROR
Error:Failed to capture snapshot of input files for task 'compileDebugJavaWithJavac' property 'classpath' during up-to-date check.> Failed to create MD5 hash for file 'F:\Projects\Table42\trunk\app\libs\appsee.jar'.
my gradle ::
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.imate.android'
minSdkVersion 19
targetSdkVersion 19
versionCode 15
versionName "1.14"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
debuggable false
buildConfigField "boolean", "DEBUG_MODE", "false"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
buildConfigField "boolean", "DEBUG_MODE", "true"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:23.1.1'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.20.1'
}
}
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/org.apache.http.legacy.jar')
compile files('libs/appsee.jar')
compile files('libs/AF-Android-SDK-v2.3.1.18.jar')
compile('com.github.nkzawa:socket.io-client:0.3.0') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.edmodo:rangebar:1.0.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.guava:guava-collections:r03'
compile 'com.lorentzos.swipecards:library:1.0.9'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
compile 'com.jakewharton:butterknife:8.2.1'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.github.bumptech.glide:glide:3.4.+'
compile('com.twitter.sdk.android:twitter:2.3.2#aar') {
transitive = true;
}
compile('io.nlopez.smartlocation:library:3.3.1') {
transitive = false
}
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.stripe:stripe-android:4.0.1'
compile "com.github.miguelbcr:RxPaparazzo:0.5.2-2.x"
compile 'com.afollestad.material-dialogs:core:0.9.4.4'
compile 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:design:$rootProject.supportLibraryVersion"
androidTestCompile "com.android.support:support-annotations:$rootProject.ext.supportAnnotationsversion"
// Android Testing Support Library's runner and rules
androidTestCompile "com.android.support.test:runner:$rootProject.ext.runnerVersion"
androidTestCompile "com.android.support.test:rules:$rootProject.ext.rulesVersion"
// Espresso UI Testing dependencies.
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion"
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
//geofire
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.zxing:core:3.2.1'
compile 'com.braintreepayments.api:drop-in:3.+'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.ratty3697:android-smart-animation-library:1.6'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile project(path: ':firebase')
}
apply plugin: 'com.google.gms.google-services'**

add aviary sdk 3.6.3

I'm trying to compile with this gradle to add aviary sdk to my project
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "..."
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
signingConfigs {
release {
...
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
}
repositories {
maven { url 'https://dl.bintray.com/brendanw/maven/' }
maven { url 'https://clojars.org/repo/' }
maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' }
maven { url 'https://maven.fabric.io/public' }
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Compatibility
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:multidex:1.0.1'
// Play services API
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-location:9.6.1'
compile 'com.google.android.gms:play-services-places:9.6.1'
// Map Utils
compile 'com.google.maps.android:android-maps-utils:0.4.3'
// Realm.io
compile 'io.realm:android-adapters:1.3.0'
// Stetho
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.uphyca:stetho_realm:0.9.0'
// Firebase
compile 'com.google.firebase:firebase-messaging:9.6.1'
// Parceler
compile 'org.parceler:parceler-api:1.1.1'
apt 'org.parceler:parceler:1.1.1'
// Events
compile 'org.greenrobot:eventbus:3.0.0'
// Network
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'org.apache.commons:commons-lang3:3.4'
// Data Verification
compile 'com.googlecode.libphonenumber:libphonenumber:5.5'
// Image Loading
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
// Annotations
compile 'com.jakewharton:butterknife:7.0.1'
compile 'javax.validation:validation-api:1.0.0.GA'
compile 'javax.annotation:jsr250-api:1.0'
// Views
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'io.card:android-sdk:5.3.4'
// Logging
compile 'com.jakewharton.timber:timber:4.1.1'
compile 'com.jaredrummler:android-device-names:1.0.9'
// Barcode
compile 'com.google.zxing:core:3.2.1'
// Facebook
compile 'com.facebook.android:facebook-android-sdk:4.15.0'
// Payment
compile 'me.brendanweinstein:paymentkit-droid:1.0.4'
compile 'com.stripe:stripe-android:1.0.4'
//fabric
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
//adobe
compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.3'
}
apply plugin: 'com.google.gms.google-services'
and i have some errors on values compiled file..
C:\Users\OLENGO\Desktop\Remy\android-printogo\app\build\intermediates\res\merged\debug\values\values.xml
Error:(1562) Error retrieving parent for item: No resource found that matches the given name '#style/Theme.Base.AppCompat.Dialog.FixedSize'.
I already try with this sample : https://github.com/CreativeSDK/android-getting-started-samples/blob/master/image-editor-ui/guide/image-editor.markdown
but if i upgrade the compileSdkVersion, even the sample have some errors
Does anyone else had such problem, and is there any way to avoid this crash?

Android get Failed resolution of: Landroid/support/v7/internal/widget/TintManager

i read more solutions about this problem but my problem couldn't resolve. its happened after add more library such Dagger and Realm on my project
Full stack error:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/internal/widget/TintManager;
at android.support.design.widget.TabLayout$TabView.<init>(TabLayout.java:1179)
at android.support.design.widget.TabLayout.createTabView(TabLayout.java:655)
at android.support.design.widget.TabLayout.addTabView(TabLayout.java:690)
at android.support.design.widget.TabLayout.addTab(TabLayout.java:385)
at android.support.design.widget.TabLayout.addTab(TabLayout.java:360)
at android.support.design.widget.TabLayout.setTabsFromPagerAdapter(TabLayout.java:644)
at android.support.design.widget.TabLayout.setupWithViewPager(TabLayout.java:615)
UPDATED:
My gradle file content :
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.pishguy.androidapplication.xxx"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
}
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
project.ext {
supportVersion = '24.2.1'
daggerVersion = '2.0.1'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile("com.android.support:support-v4:$supportVersion") {
force = true;
}
compile "com.android.support:appcompat-v7:$supportVersion"
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
compile 'com.jakewharton.rxbinding:rxbinding-design:0.4.0'
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile('io.socket:socket.io-client:0.7.0') {
exclude group: "org.json", module: "json"
}
compile('com.github.ozodrukh:CircularReveal:2.0.1#aar') {
transitive = true;
}
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.bugsnag:bugsnag-android:+'
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jaredrummler:android-device-names:1.0.9'
compile 'org.sufficientlysecure:html-textview:1.6'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.kogitune:pre-lollipop-activity-transition:1.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.alexvasilkov:foldable-layout:1.2.0'
compile 'cat.ereza:customactivityoncrash:1.5.0'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'
compile 'com.github.goka.flickableview:flickableview:1.0.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.github.justzak:dilatingdotsprogressbar:1.0.1'
compile('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.tumblr:backboard:0.1.0'
compile "com.google.dagger:dagger:${daggerVersion}"
apt "com.google.dagger:dagger-compiler:${daggerVersion}"
provided 'javax.annotation:javax.annotation-api:1.2'
compile project(':lib-searchview')
}
how can i resolve this problem?
Replace
compile("com.android.support:support-v4:${supportPackageVersion}") {
force = true;
}
compile "com.android.support:appcompat-v7:${supportPackageVersion}"
with
compile 'com.android.support:appcompat-v7:23.1.1'
May be it will help you.
Support library versions from RxBinding:
supportVersion = '24.2.1'
supportAnnotations = "com.android.support:support-annotations:$supportVersion"
supportV4CoreUi = "com.android.support:support-core-ui:$supportVersion"
supportRecyclerView = "com.android.support:recyclerview-v7:$supportVersion"
supportAppCompat = "com.android.support:appcompat-v7:$supportVersion"
supportDesign = "com.android.support:design:$supportVersion"
supportLeanback = "com.android.support:leanback-v17:$supportVersion"
Your current build.gradle support version:
project.ext {
supportPackageVersion = '24.0.0'
You should update to 24.2.1.

Categories

Resources