简体   繁体   中英

How import android design support library with custom appcompat-v7?

I use Android Studio for my project.
I want to use custom appcompat-v7 library in my android project.
Android design support library has it own appcompat-v7 library.

my gradle

compile(':mycustomAppcompat-v7')
compile 'com.android.support:design:23.2.0'

My problem :
I have two appcompat-v7 library that come from:

1-My custom library.
2-Design support needed.

how can i fix it?
thank you

You can exclude specific modules from libraries you compile with gradle. This feature is valuable in a number of specific situations, like when you have conflicting or duplicated modules as in your case. To fix this, you can explicitly determine which modules you would like to exclude from compilation in gradle as follows:

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

This says you want to compile com.android.support:design:23.2.0 but you want to exclude its appcompat-v7 module since you are utilizing your custom one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM