调用AVInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
public void done(AVException e) {
if (e == null) {
// 保存成功
String installationId = AVInstallation.getCurrentInstallation().getInstallationId();
// 关联 installationId 到用户表等操作……
} else {
Toast.makeText(UIUtils.getContext(), "联网失败,请检查网络...", Toast.LENGTH_LONG).show();

            }
        }
    });

时总是不成功

你好,请在 else 里输出 e.printStackTrace() 看是什么报错。

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

是不是系统时间不对,SSL 认证失败了。