I would like to create tab-layout and add dependencies compile 'com.android.support:design:23.4.0' but he error simultaneously with 'com.android.support:appcompat-v7:25.3.1', please help
Asked
Active
Viewed 2,398 times
-3
-
you should put the code inside dependencies code block,not outside. – John Joe Jul 25 '17 at 01:23
-
@JohnJoe He is already in dependencies, sorry the picture is not shown ful – Max thinks Jul 25 '17 at 01:29
-
what are the error you getting ? – John Joe Jul 25 '17 at 01:33
-
@JohnJoe "This support library should not use a different version(23) than the 'compileSdkVersion' (25) – Max thinks Jul 25 '17 at 01:39
-
@JohnJoe please help me.. – Max thinks Jul 25 '17 at 01:45
-
https://stackoverflow.com/questions/38072185/this-support-library-should-not-use-a-different-version-error-in-build-gradle – John Joe Jul 25 '17 at 01:52
2 Answers
0
The reason of that error is that you are using different versions of the compatibility library.
Instead of this: compile 'com.android.support:design:23.4.0'
use this: Use this instead: compile 'com.android.support:design:25.3.1'
Also I recommend you to use a variable to keep consistency like below:
ext {
supportLibVersion = '25.3.1' // variable that can be referenced to keep support libs consistent
}
dependencies {
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
}
Leandro Ocampo
- 1,894
- 18
- 38
0
Use this library for Version-25 in gradle.
-> compile 'com.android.support:design:25.3.1'
Tome
- 3,234
- 3
- 33
- 36
Diwan Dhanvani
- 291
- 1
- 3
- 10