This is the full 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.
I know that there are a lot of solutions to this type of answers but I am an absolute beginner in android studio and I couldnt understand those solutions like the command line interface interacting with gradle and so on...
I was looking for a simple solution to this problem if there is. Thanks a lot!
Change all the implementation in your build gradle app For Example.
Change It all to latest version(27.1.1) and sync the project.
Your root gradle file should contains:
And the module gradle file should contains libraries like:
It is just a example of typical simple gradle configuration. Use as needed
Modify below line in gradle file.
its requires just few steps... 1. Go to module.app file. 2. Change your target sdk version and compile sdk version to latest version ( here it is 27) 3.then change appcompact version to 27.1.1 4. Sync gradle file
Recently I was getting this error again....I just go to build->rebuild project and it works everytime for me.
Go to build.gradle(Module:app) file, add
compile 'com.android.support:support-annotations:27.1.1'
into dependencies, then click 'sync now' again.