Android studio 报错这个支持库不要使用低版本(19)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25106235/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:06:07  来源:igfitidea点击:

Android studio error This support library should not use a lower version (19)

android

提问by Rong Sir

I created the project then error message:

我创建了项目然后错误消息:

Error:(23, 12) This support library should not use a lower version (19) than the targetSdkVersion (20)

error code is here: compile 'com.android.support:appcompat-v7:19.+'

错误代码在这里: compile 'com.android.support:appcompat-v7:19.+'

回答by Itzik Samara

Change

改变

compile 'com.android.support:appcompat-v7:19.+'

to

compile 'com.android.support:appcompat-v7:20+'

first open SDK Manager and update the support Libary. or change the targetSDKVersion to 19

首先打开 SDK Manager 并更新支持库。或将 targetSDKVersion 更改为 19

the filename is 'build.gradle'

文件名是“build.gradle”

回答by Milad Faridnia

Go to Tools--> Android--> SDK Manager --> SDK Tools tab --> Android Support Library --> look at the Version

转到工具--> Android--> SDK 管理器--> SDK 工具选项卡--> Android 支持库--> 查看版本

then go to Project view--> YourProject -->app --> build.gradle --> change

然后转到项目视图--> YourProject --> app --> build.gradle --> 更改

compile 'com.android.support:appcompat-v7:19.+'

to

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

Android Support Library version must be replaced to the latest version you have in your SDK. Note that your targetSDKVersionmust be the same as com.android.support:appcompat-v7:Version.

Android 支持库版本必须替换为您的 SDK 中的最新版本。请注意,您的targetSDKVersion必须与com.android.support:appcompat-v7:Version.