I've solved this problem adding to gradle the following code: configurations { androidTestCompile.exclude group: 'com.android.support', module: 'support-v4' }