简体   繁体   English

L预览:呼叫需要API级别21(当前最小值为20)

[英]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? 怎么解决?

错误

gradle这个

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.

相关问题 调用要求API级别21,当前最小值为8 - Call requires API level 21, current min is 8 需要API级别21(当前最小值为16) - Requires API level 21 (current min is 16) 呼叫需要API级别21(当前为14) - Call requires API level 21 (current is 14) 如何在Android Studio中为消息“调用要求API级别21(当前最小值为16)”启用lint错误? - How to enable lint error in Android Studio for message “Call requires API level 21 (current min is 16)”? 通话需要 API 级别 21(当前最低为 14):android.speech.tts.TextToSpeech#speak - Call requires API level 21 (current min is 14): android.speech.tts.TextToSpeech#speak 调用需要 API 级别 21(当前最小值为 17):android.hardware.camera2.CameraDevice.StateCallback - call requires API level 21 (current min is 17): android.hardware.camera2.CameraDevice.StateCallback 调用需要 api 级别 24(当前最小值为 21)新的 android.icu.text.DecimalFormat - call requires api level 24 (current min is 21) new android.icu.text.DecimalFormat 调用需要 API 级别 29(当前最小值为 21):`android.widget.NumberPicker#setTextColor` - Call requires API level 29 (current min is 21): `android.widget.NumberPicker#setTextColor` 调用需要 API 级别 21(当前最小值为 19):android.view.View() - Call requires API level 21 (current min is 19): android.view.View() 错误:调用需要 API 级别 24(当前最小值为 21):java.util.Map#forEach [NewApi] - Error: Call requires API level 24 (current min is 21): java.util.Map#forEach [NewApi]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM