How to remove compile sdk version library error from build gradle (Module:app) dependencies file.
Build.Gradle( Module:app ) file is one of the most important file inside android studio which contains all the valuable information like compileSdkVersion, buildToolsVersion, minSdkVersion, targetSdkVersion, buildTypes and dependencies. Inside dependencies scope android developers can add libraries compile name and they will be automatically compiled and import into android project. But some times when developers trying to add support libraries compile name into dependencies scope then they have faced an error message ” Solve this support library should not use a different version than the compilesdkversion Error in Android Studio(21)(22),(23),(24) ” and because of that error developer were unable to add support libraries in their projects. So in this tutorial we are going to solve this problem.
How to Solve this support library should not use a different version than the compilesdkversion Error in Android Studio.
1. The method of solving this error is very easy and simple all you have to do is find the compileSdkVersion inside your build.gradle file. then replace the compileSdkVersion number to your support library number so they be look like same. For example :
If your compileSdkVersion is 24 and compile ‘com.android.support:design:23.2.+’ contains 23 then just replace 23 with 24 so they will have to same compileSdkVersion number.