Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KLog 用在 kotlin 里面打印 会报错,出现数组下标越界 #38

Open
zhaoxiuyu opened this issue Jun 10, 2017 · 3 comments
Open

Comments

@zhaoxiuyu
Copy link

KLog 用在 kotlin 里面打印 会报错,出现数组下标越界
代码如下 :
navigation.setOnNavigationItemSelectedListener {
item ->
when (item.itemId) {
R.id.order -> {
## Klog.d("order")
return@setOnNavigationItemSelectedListener true
}
}
false
}

ArrayIndexOutOfBoundsException: length=0; index=0

@yuchen5202064
Copy link

我也遇到了0 0

@PiersX
Copy link

PiersX commented Jul 5, 2017

遇到同样问题,应该是在KLog.d("xxxxx")调用中没有设置Tag,结果在Kotlin中因语法识别进入到了d(String tag, Object... objects) 接口,结果导致了错误。
如果增加TAG参数就不会有此问题,但是增加TAG感觉代码多了一些,有点麻烦,希望能尽快fix这个问题。

@lx1992lx
Copy link

我自己重写了一份,XLog,支持Kotlin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants