RuntimeException: please setup your appkey either in AndroidManifest.xml or through EMChat.setAppkey
不要问我,在AndroidManifest设置了没有,肯定是设置了!
不过看了下环信的代码, EMChatManager 下
private String getBroadcastSuffix() {
if(TextUtils.isEmpty(EMChatConfig.getInstance().APPKEY)) { throw new RuntimeException("please setup your appkey either in AndroidManifest.xml or through EMChat.setAppkey"); } else { return this.applicationContext != null?EMChatConfig.getInstance().APPKEY.replaceAll("#", ".").replaceAll("-", ".") + this.applicationContext.getPackageName():EMChatConfig.getInstance().APPKEY.replaceAll("#", ".").replaceAll("-", "."); } } 方法;
只有一个疑问:1、你们在自己的私有方法中抛出RuntimeException真的好么?
不过看了下环信的代码, EMChatManager 下
private String getBroadcastSuffix() {
if(TextUtils.isEmpty(EMChatConfig.getInstance().APPKEY)) { throw new RuntimeException("please setup your appkey either in AndroidManifest.xml or through EMChat.setAppkey"); } else { return this.applicationContext != null?EMChatConfig.getInstance().APPKEY.replaceAll("#", ".").replaceAll("-", ".") + this.applicationContext.getPackageName():EMChatConfig.getInstance().APPKEY.replaceAll("#", ".").replaceAll("-", "."); } } 方法;
只有一个疑问:1、你们在自己的私有方法中抛出RuntimeException真的好么?
没有找到相关结果
已邀请:
1 个回复
环信技术支持中心