Skip to content Skip to sidebar Skip to footer

If I Start A New Application Then This Error Is Showing. How I Can Resolve It

Error:Execution failed for task ':app:preDebugAndroidTestBuild'. Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (2

Solution 1:

Add this into your AndroidManifest.xml file the <application> tag.

<meta-data
        android:name="android.support.VERSION"
        android:value="26.1.0"
        tools:replace="android:value" />

You can also provide other version e.g. 27.1.1

Solution 2:

You can force the annotation library to test using in build.gradle:

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

Another solution is to use this in the top level file:

configurations.all {
    resolutionStrategy.force 'com.android.support:support-annotations:26.1.0'
}

use any of one in Above two options, I hope it may useful to you.

Post a Comment for "If I Start A New Application Then This Error Is Showing. How I Can Resolve It"