在myFirebase消息中生成新令牌时出现错误“无法解析符号'getInstance'”,“无效的方法声明;需要返回类型”
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener( MyActivity.this, new OnSuccessListener<InstanceIdResult>() {
@Override
public void onSuccess(InstanceIdResult instanceIdResult) {
String newToken = instanceIdResult.getToken();
Log.e("newToken",newToken);
}
});[error screen][1]