Error:Execution failed for task ':app:preDebugAndroidTestBuild' , when tried to run java program in android studio

后端 未结 14 1259
渐次进展
渐次进展 2021-02-13 03:03

Getting the below error at the time of running java program in android studio.

Error:Execution failed for task \':app:preDebugAndroidTestBuild\'.

<
相关标签:
14条回答
  • 2021-02-13 03:47

    Add this to your app gradle file

    configurations.all {
       resolutionStrategy {
          force 'com.android.support:support-annotations:26.1.0'
       }
    }
    
    0 讨论(0)
  • 2021-02-13 03:48

    I answered before some minutes same question Reference. If you are not going to implement testing code, then remove junit from your app.

    There are lot of other questions related to this.

    Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.3.0) and test app (23.1.1) differ

    Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.1.0) and test app (23.0.1) differ

    0 讨论(0)
提交回复
热议问题