0

I'm following the tutorial https://www.youtube.com/watch?v=X5AOrAhyrkg&list=PLRRNzqzbPLd8Qldg1J3LFesfXW9hWM_t4&index=3&t=0s

But when I implement the library 'me.zhanghai.android.materialprogressbar:library:1.6.1' it causes some error.

I did take a look at Android Material and appcompat Manifest merger failed but when I try that solution on It doesn't work for me. I know that I'm using the latest version of AndroidX which is the problem. But I haven't figured it out yet.

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'

    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'

    implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'

    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

So I hope to find a solution

Anh Huynh
  • 39
  • 1
  • 7

1 Answers1

0

This is what I encountered previously with third party libraries. This issue occurs when you are currently migrated to Androidx and the third party lib (in your case, 'me.zhanghai.android.materialprogressbar:library:1.6.1') is still using android support and it will clash causing the merge dex error.

I don't think if this will help, but do try adding this.

    ('me.zhanghai.android.materialprogressbar:library:1.6.1'){ 
       exclude group: "com.android.support"
      }

If it doesn't, you might have to post your issue on their github page and see if they can promise u an answer.

Bowie Chang
  • 126
  • 12
  • Unfortunately, it doesn't work either. I guess that I have to post my issue on their GitHub. – Anh Huynh May 19 '19 at 13:45
  • I have also met with a lot of issue when migrating to androidx, usually the third party libs starts acting up. Also, after taking a look at your gradle.app, are u sure u have migrated to androidx? Because ur implements are still in android.supports. – Bowie Chang May 19 '19 at 13:52
  • HAHA I just simply lower the version Finally It's able to work. Thank u :)) – Anh Huynh May 19 '19 at 14:11