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

不能打开书籍看书! #124

Closed
xukongyang opened this issue Nov 29, 2018 · 6 comments
Closed

不能打开书籍看书! #124

xukongyang opened this issue Nov 29, 2018 · 6 comments

Comments

@xukongyang
Copy link

xukongyang commented Nov 29, 2018

昨天在boox电子书nova(安卓版本6.01)上安装会提示书源为空,然后确认导入书源后是没有导入书源的,只有从其他手机的备份恢复后才会出现书源,然后运行时偶尔会出错,但是书是能看的。

今天我删掉app重新安装,从其他手机的备份只倒入书源,其他设置保持安装后的初始状态,能搜索到书,但是点击书目想要看书就一直报错,然后程序停止。

报错信息如下:

e2bbde4c-1253-4e58-9a1f-de293b28cdf7

@gedoor
Copy link
Owner

gedoor commented Nov 29, 2018

缓存目录下的错误报告发出来看看

@xukongyang
Copy link
Author

xukongyang commented Nov 29, 2018

首先谢谢gedoor的回复,

不过我经过查看源代码,找到原因了,查看日志,

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Handler.removeCallbacks(java.lang.Runnable)' on a null object reference
at com.monke.monkeybook.view.activity.ReadBookActivity.t(ReadBookActivity.java:265)
at com.monke.monkeybook.view.activity.ReadBookActivity.k(ReadBookActivity.java:226)
at com.monke.monkeybook.base.MBaseActivity.onCreate(MBaseActivity.java:40)
at com.monke.monkeybook.view.activity.ReadBookActivity.onCreate(ReadBookActivity.java:143)

看出错的代码是设置屏幕时间的。

我想了半天,应该是因为我在系统设置中把自动休眠设置为「永不」的原因(因为我要下载书籍,要下很多本书,屏幕自动休眠就会中断下载书籍,所以我就把自动休眠设置为了「永不」)

果然,我把超时时间设置为一个值,例如15分钟,再重新打开阅读,就能正常打开书籍了!!!

另外请教一下gedoor,我尝试编译源码,但是提示 File google-services.json is missing. The Google Services Plugin cannot function without it. 这个该怎么破啊?可以私信我一个这个文件吗?

@gedoor
Copy link
Owner

gedoor commented Nov 29, 2018 via email

@xukongyang
Copy link
Author

谢谢答复,注释掉上面2行后,编译不报错了,但是在 build apk的时候又报了个错:

Error:FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:validateSigningDebug'.

Keystore file '/Users/xukong/develop/java/java/MyBookshelf/app/s.keystore.temp' not found for signing config 'myConfig'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 8s

@xukongyang
Copy link
Author

xukongyang commented Nov 29, 2018

找到解决方法了,apk成功生成了

signingConfigs {
release {
storeFile file("ouman.jks")
storePassword "com.ouman.car "
keyAlias "ouman"
keyPassword "com.ouman.car "
}
}

buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}

是把上面这两段代码全都注释。


作者:哆啦U梦
来源:CSDN
原文:https://blog.csdn.net/u013952370/article/details/52923353
版权声明:本文为博主原创文章,转载请附上博文链接!

@gedoor
Copy link
Owner

gedoor commented Nov 29, 2018 via email

@gedoor gedoor closed this as completed Dec 2, 2018
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

2 participants