android sdk platform is too old,The SDK platform-tools version (27.0.1) is too old to check APIs com...

标签:

项目报错:

f1c0b899fbc862f5f31aa1efbe07a90d.png

Ctrl+F1查看:

The SDK platform-tools version (27.0.1) is too old to check APIs compiled with API 28;

please update less... (Ctrl+F1)

This check scans through all the Android API calls in the application and warns about any calls

that are not available on all versions targeted by this application

(according to its minimum SDK attribute in the manifest).

If you really want to use this API and don't need to support older devices

just set the minSdkVersion in your build.gradle or AndroidManifest.xml files.

If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution)

that this code will only ever be called on a supported platform,

then you can annotate your class or method with the

@TargetApi annotation specifying the local minimum SDK to apply,

such as @TargetApi(11), such that this check considers 11

rather than your manifest file's minimum SDK as the required API level.

If you are deliberately setting android: attributes in style definitions,

make sure you place this in a values-vNN folder in order to avoid

running into runtime conflicts on certain devices

where manufacturers have added custom attributes

whose ids conflict with the new ones on later platforms.

Similarly, you can use tools:targetApi="11" in an XML file

to indicate that the element will only be inflated in an adequate context.

SDK platform与SDK platform-tools版本不一致,所以要升级

8e136b366083ab74bd7994c4c3f985e9.png

选中升级即可。

bdeb1ad876be18318b0950e00106d57e.png

重启下android studio:

8cacba1242c986e05fc30ec6ab2751f4.png

f10bfdd57060892be015de923e571797.png

标签:

来源: https://blog.csdn.net/sinat_31057219/article/details/83058991

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值