下图显示了用于在注册时向我的应用用户发送电子邮件验证的Firebase代码段。
图像中突出显示的区域显示以下警告:
Unchecked assignment: 'anonymous com.google.android.gms.tasks.OnCompleteListener' to 'com.google.android.gms.tasks.OnCompleteListener<java.lang.Void>' less... (Ctrl+F1)
Signals places where an unchecked warning is issued by the compiler, for example:
void f(HashMap map) {
map.put("key", "value");
}
Hint: Pass -Xlint:unchecked to javac to get more details.
我无法解释警告。我怎么能摆脱这个警告?任何形式的帮助将不胜感激。
答案 0 :(得分:0)
new OnCompleteListener()
应替换为
new OnCompleteListener<AuthResult>()