This support library should not use a different version, error in build.gradle

拜拜、爱过 提交于 2019-11-28 09:50:21

Your compileSdkVersion is 23 in the build.gradle file but you're trying to use appcompat-v7:24.0.0 which is for API 24, so you should use appcompat-v7:23.x.y for API 23. If you still want to use appcompat-v7:24.0.0 then you should change the compileSdkVersion to 24

You should use this for compileSdkVersion 23:

compile 'com.android.support:appcompat-v7:23.4.0'

and this for compileSdkVersion 24 :

compile 'com.android.support:appcompat-v7:24.0.0'

Edit

If you work on Android Studio, then you probably don't need to worry about the latest version available, it'll let you know about the latest available version.

You can also check the latest versions available for every sdk version here

Yep, they must not be different. Change it to compile 'com.android.support:appcompat-v7:23.4.0'

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!