复制代码
- android {
- compileSdkVersion 21
- buildToolsVersion "21.1.0"
- defaultConfig {
- ...
- minSdkVersion 14
- targetSdkVersion 21
- ...
- // Enabling multidex support.
- multiDexEnabled true
- }
- ...
- }
- dependencies {
- compile 'com.android.support:multidex:1.0.0'
- }
再在MultiDexTestRunner的onCreate方法中添加如下代码:复制代码
- android {
- defaultConfig {
- ...
- testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
- }
- }
- dependencies {
- androidTestCompile('com.android.support:multidex-instrumentation:1.0.1') {
- exclude group: 'com.android.support', module: 'multidex'
- }
- }
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |