0%

空指针异常:

1
2
3
4
5
6
7
8
java.lang.NullPointerException: println needs a message
at android.util.Log.println_native(Native Method)
at android.util.Log.e(Log.java:232)
at com.lphtsccft.zhangle.foundation.utility.t.a(SourceFile:227)
at com.lphtsccft.zhangle.foundation.utility.t.c(SourceFile:462)
at com.lphtsccft.zhangle.foundation.utility.t.b(SourceFile:409)
at com.lphtsccft.zhangle.foundation.utility.t.a(SourceFile:26)
at com.lphtsccft.zhangle.foundation.utility.t$a.onServiceConnected(SourceFile:345)

注意打印Log时,不能使用如下方式,message有可能为 null

1
2
3
4
try {
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}
阅读全文 »

repo init 初始化时报错

1
2
3
4
5
6
 Resolving deltas: 100% (39/39), done.
From aosp.tuna.tsinghua.edu.cn/platform/manifest
* [new branch] stable -> origin/stable
* [new branch] windows -> origin/windows

fatal: branch 'stable' has not been signed

解决方法

repo init 命令最后 加上--no-repo-verify选项,再次执行

1
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b master  --no-repo-verify
阅读全文 »

MVC的一个老项目,需要从另一个MVVM的项目里移植过来一些功能,新建了一个module开启了databinding后报错

1
ClassNotFoundException: Didn't find class "android.databinding.DataBinderMapperImpl" on path

谷歌之,在Stack Overflow上看到一段提示:

Got my own lib and multiple apps. Had to add both to lib and app gradle files.

阅读全文 »

项目主页:FileBrowser

在VPS服务器上传下载文件一开始是不太方便的,刚购买VPS的那段时间,最先使用scp命令上传文件、apache2下载文件,后来了解到有相关的FTP GUI客户端FileZilla,稍微方便些,但是使用体验还是不太好,偶然在一篇博文上看到一个开源的服务器端网盘,使用体验堪比百度云,分享给大家

下载

release页面 大家选择相应的系统版本下载
个人使用的系统为linux系列的Ubuntu 16.04 LTS amd64,故选择列表中的linux-amd64-filebrowser.tar.gz

阅读全文 »

Git提交推送时报错

1
2
3
4
5
Push failed
Failed with error: The remote end hung up unexpectedly
The remote end hung up unexpectedly
unable to rewind rpc post data - try increasing http.postBuffer
RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10053

原因是Git默认限制推送的大小,运行命令更改限制大小即可

1
git config --global http.postBuffer 524288000
阅读全文 »