美文网首页
AndroidStudio 包冲突解决

AndroidStudio 包冲突解决

作者: 风就那么大 | 来源:发表于2018-09-10 01:45 被阅读0次

1.查看冲突的jar包,使用一下命令查看

Android Studio的 Terminal下敲 gradlew -q app:dependencies 命令,

- com.android.support.test.espresso:espresso-core:2.2.2

    +--- com.squareup:javawriter:2.1.1

    +--- com.android.support.test:rules:0.5

    |    \--- com.android.support.test:runner:0.5

    |        +--- junit:junit:4.12

    |        |    \--- org.hamcrest:hamcrest-core:1.3

    |        \--- com.android.support.test:exposed-instrumentation-api-publish:0.5

    +--- com.android.support.test:runner:0.5 (*)

    +--- javax.inject:javax.inject:1

    +--- org.hamcrest:hamcrest-library:1.3

    |    \--- org.hamcrest:hamcrest-core:1.3

2.使用exclue排除

dependencies {

    compile 'com.android.support:appcompat-v7:22.2.1'

    compile ('com.android.support:design:22.2.1')

            {

                exclude group: 'com.android.support'

            }

    compile 'com.shamanland:fonticon:0.1.8'

    androidTestCompile 'com.android.support:support-annotations:22.2.1'

    androidTestCompile 'com.android.support.test:runner:0.3'

    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2')

            {

                exclude  group:'org.hamcrest'

            }

}

相关文章

网友评论

      本文标题:AndroidStudio 包冲突解决

      本文链接:https://www.haomeiwen.com/subject/wpjjgftx.html