I was adding the corresponding dependency, in the Gradle / Module: app file to work with CardView: compile 'com.android.support:cardview-v7:24.2.0'. But I'm marking errors in that line added and in the app: compat. Both due to incompatible versions problem.
Errors: the first is in the app line: compat:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 24.2.0. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:cardview-v7:24.2.0 more... (Ctrl+F1)
the second one is in the CardView aggregate dependency:
This support library should not use a different version (24) than the compileSdkVersion (25)
Dependency block in the file:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:24.2.0'
testCompile 'junit:junit:4.12'
What should be the correct way to place them to avoid that error?