[英]L preview: Call requires API level 21 (current min is 20)
I am trying L and got an API level error. 我正在尝试L并得到API级错误。 I have set the current min to 'L' but it seems Android Studio think it's 20.
我已将当前分钟设置为“L”,但似乎Android Studio认为它是20。
How to fix it? 怎么解决?
I updated Android Studio 0.6.1 to 0.8.0 and the error disappeared. 我将Android Studio 0.6.1更新为0.8.0 ,错误消失了。
build.gradle looks exactly the same : build.gradle看起来完全一样 :
compileSdkVersion 'android-L'
buildToolsVersion '19.1.0'
defaultConfig {
applicationId 'com.prt2121.tryl'
minSdkVersion 'L'
targetSdkVersion 'L'
versionCode 1
versionName '1.0'
}
I don't think my question is a duplicate but thanks anyway. 我不认为我的问题是重复的,但无论如何,谢谢。
Change 更改
android {
compileSdkVersion 'android-L'
buildToolsVersion '19.1.0'
to 至
android {
compileSdkVersion 21
buildToolsVersion '21.0.2'
Note android-L
is in single quotes but 21
isn't. 注意
android-L
是单引号但21
不是。 21
is an integer and not a string. 21
是整数而不是字符串。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.