使用Android Studio进行安卓开发常见错误集合

2018-03-07  本文已影响0人  养渔人
  1. ​ Execution failed for task ':app:preDebugAndroidTestBuild'.

Conflict with dependency 'com.android.support:support-annotations' in project ':app'. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

解决方法:
在Module-level层build.gradle的Android{} 闭包中添加:

    // Resolve dependency differences between app and tests
    configurations.all {
        resolutionStrategy.force 'com.android.support:support-annotations:版本号'
    }
上一篇 下一篇

猜你喜欢

热点阅读