[英]AS create a new project,code reports some error, but it can run normally
when I create a new project in Android Studio Arctic Fox |当我在 Android Studio 北极狐中创建一个新项目时 | 2020.3.1 Patch 4,I create MainActivity by kotlin,code reports some error (introduced red), but it can run normally.
2020.3.1补丁4,我通过kotlin创建MainActivity,代码报错(红色介绍),但可以正常运行。
I' ve looked around and apparently I've got the choice between these solutions:我环顾四周,显然我可以在这些解决方案之间进行选择:
It can run normally,but Look uncomfortable,I am searching for a long time on net.可以正常运行,但是看着不舒服,在网上找了半天。 But no use.
但是没有用。 Please help or try to give some ideas how to achieve this.Thanks in advance.
请帮助或尝试提供一些想法如何实现这一点。在此先感谢。
Try using the latest and appropriate version for your Gradle
and using the correct version of the initial in the Gradle.尝试为您的 Gradle 使用最新和适当的版本,并在
Gradle
中使用正确的初始版本。 You can also invalidate your caches to ensure using the latest new data.您还可以使缓存无效,以确保使用最新的新数据。 In some cases, upgrading your
SDK
is a way to fix the problem.在某些情况下,升级
SDK
是解决问题的一种方法。
If not works, please share your error here to follow up.如果不起作用,请在此处分享您的错误以跟进。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.