public static bool Init(string appDataDir, string appInstallDir = "", NimUtility.NimConfig config = null) { if (_sdkInitialized) { RegisterSdkCallbacks();//需要重新注册; return(true); } string configJson = null; if (config != null && config.IsValiad()) { configJson = config.Serialize(); } _sdkInitialized = ClientNativeMethods.nim_client_init(appDataDir, appInstallDir, configJson); if (_sdkInitialized) { RegisterSdkCallbacks(); } //调用com.netease.nimlib.SystemUtil的初始化接口 InitSystemUtil(); return(_sdkInitialized); }