8.12笔记 retrofit超时设置,studio 修改 Lint Error Checking
2015-08-12 13:06
465 查看
8.12笔记 retrofit超时设置,studio 修改 Lint Error Checking
retrofit请求库设置超时
http://stackoverflow.com/questions/29380844/how-to-set-a-timeout-in-retrofit-library
http://stackoverflow.com/questions/7071271/activity-class-does-not-exist
Launching application: com.foo.app/com.foo.app.main.
DEVICE SHELL COMMAND: am start -n “com.foo.app/com.foo.app.main”
Starting: Intent { cmp=com.foo.app/.main}
Error type 3
Error: Activity class {com.foo.app/com.foo.app.main} does not exist.
Activity class does not exist
如果以上方法修复不了,而且你的手机是nexus5(其他手机可以运行),那就是nexus系统的bug,修改包名后造成,原因未知。
如果studio开启了lint error checking(默认开启),国际化string文件不齐全,build-apk就会失败,需要关闭
http://stackoverflow.com/questions/25870932/how-to-remove-lint-errors-in-android-studio
studio
Lint Error Checking
需要加这样一句话
[2012-05-07 09:32:02 - SQLiteTest] Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER
[2012-05-07 09:32:02 - SQLiteTest] Please check logcat output for more details.
[2012-05-07 09:32:02 - SQLiteTest] Launch canceled!
结果百度才知道原来是因为相同的Provider,所以得改一下AndroidManifest.xml的
retrofit请求库设置超时
http://stackoverflow.com/questions/29380844/how-to-set-a-timeout-in-retrofit-library
public RestAdapter providesRestAdapter(Gson gson) { final OkHttpClient okHttpClient = new OkHttpClient(); okHttpClient.setReadTimeout(60, TimeUnit.SECONDS); okHttpClient.setConnectTimeout(60, TimeUnit.SECONDS); return new RestAdapter.Builder() .setServer(BuildConfig.BASE_URL) .setConverter(new GsonConverter(gson)) .setClient(new OkClient(okHttpClient)) .build(); }
http://stackoverflow.com/questions/7071271/activity-class-does-not-exist
Launching application: com.foo.app/com.foo.app.main.
DEVICE SHELL COMMAND: am start -n “com.foo.app/com.foo.app.main”
Starting: Intent { cmp=com.foo.app/.main}
Error type 3
Error: Activity class {com.foo.app/com.foo.app.main} does not exist.
Activity class does not exist
如果以上方法修复不了,而且你的手机是nexus5(其他手机可以运行),那就是nexus系统的bug,修改包名后造成,原因未知。
如果studio开启了lint error checking(默认开启),国际化string文件不齐全,build-apk就会失败,需要关闭
http://stackoverflow.com/questions/25870932/how-to-remove-lint-errors-in-android-studio
studio
Lint Error Checking
需要加这样一句话
android { lintOptions { abortOnError false } }
[2012-05-07 09:32:02 - SQLiteTest] Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER
[2012-05-07 09:32:02 - SQLiteTest] Please check logcat output for more details.
[2012-05-07 09:32:02 - SQLiteTest] Launch canceled!
结果百度才知道原来是因为相同的Provider,所以得改一下AndroidManifest.xml的
相关文章推荐
- 续上 编写Servlet查询数据库,列出员工信息列表
- java对于微信平台语音接收以及处理,语音下载以及arm格式转换MP3
- Mongodb 复制集Replica Set搭建与测试
- Hyper-V 中遇到错误 'vm' could not initialize
- 社交产品后端架构设计
- Quartz原理分析
- Windows 回调监控 <一>
- 通过若干个 Demo 进行讲解 Auto Layout
- Xcode配置SVN详细步骤
- 绘制一个简单的实现接口盘
- this compilation unit is not on the build of a java project
- va_list、va_start、va_end 宏用法小结
- jQuery(4)JQuery框架操作元素的属性与样式
- memset函数详解
- HDU5366 The mook jong (DP)
- ORACLE学习之scott用户的表结构sql
- IOS应用开发版本控制工具之Versions使用,iosversions
- leetcode 103: Binary Tree Zigzag Level Order Traversal
- TCL: LIST命令-lsearch, lsort, lrange
- Struts2 OGNL中value stack contents 和 stack contex解释简化版