我正在尝试使用 Branch IO Android SDK,通过引用分支文档,我创建了一个简单的空白应用程序并 onStart()
在 Main Activity 中实现了该方法:
@Override
public void onStart() {
super.onStart();
Branch branch = Branch.getInstance();
branch.initSession(new Branch.BranchReferralInitListener() {
@Override
public void onInitFinished(JSONObject referringParams, BranchError error) {
if (error == null) {
// params are the deep linked params associated with the link that the user clicked before showing up
Log.i("BranchConfigTest", "deep link data: " + referringParams.toString());
} else {
Log.e("MyApp", error.getMessage());
}
}
}, this.getIntent().getData(), this);
}
通过分支链接打开应用程序后,我在 Android Logcat 上收到此错误:
E/MyApp:无法初始化分支。无法访问分支服务器,请稍后再试。
I/Adreno-EGL: : EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.1.C3__release_AU () OpenGL ES Shader Compiler Version: E031.25.03.06 Build Date: 04/27/15 Mon Local Branch: mybranch9445032 Remote Branch: quic/LA.BF.1.1.1.c3_1 本地补丁:无 重建分支:无