duplicate entry: com/android/volley/AuthFailureError.class while compiling project in android studio

前端 未结 9 1931
长情又很酷
长情又很酷 2020-12-02 00:01

I am using external libraries payu money sdk and linkedin-sdk, both uses volley libraries, which while compiling project gives duplicate entry of AuthFailureError.class

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 00:13

    Add multiDexEnabled true in the defaultConfig section of your gradle file

    Then,

    compile 'com.android.support:multidex:1.0.1' in your dependencies

    Finally add below in your application class:

     @Override
        protected void attachBaseContext(Context base) {
            super.attachBaseContext(base);
            MultiDex.install(this);
        }
    

    Also, check if you are using volley.jar in your libs folder. If so, delete that jar file, and compile again. Sometimes, jar dependencies conflicts with those compiled using remote source.

提交回复
热议问题