Wednesday, 25 July 2018

Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ.

After a long time when I created a new project in my Android Studio 3.0.1,  it gave the error:-

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

When I searched this error on Internet I got the solution that just remove these two lines of dependencies your project's  build.gradle(Module:app). To locate  build.gradle(Module:app) go to your project directory structure and then Gradle Scripts head , you will found build.gradle(Module:app)


In build.gradle(Module:app), under dependencies section remove last two lines.


androidTestImplementation 'com.android.support.test:runner:1.0.2'androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'



Then click on Sync now


After syncing you will see that your problem has been resolved now.


You can see some more solution on web. This is the only solution that I have been tried to resolve this problem.


Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...