[英]Cannot resolve symbol Val and as
When I use this code:当我使用此代码时:
val km = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager;
I get the same error code cannot resolve symbol for val and as.我得到相同的错误代码无法解析 val 和 as 的符号。
You are using kotlin based keyword 'val' which is unavailable in the context of java.您正在使用基于 kotlin 的关键字“val”,该关键字在 java 上下文中不可用。
use the following to resolve it:使用以下方法解决它:
KeyguardManager km = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
Val ValidMobileNumber="0123456789" Val ValidPassword="thanos" android app开发中的获取和错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.