
Android
青鸟路过佳城
听雨打花瓣的声音
展开
-
W/System.err(1437): android.os.NetworkOnMainThreadException
分析:在Android4.0之后,网络操作强制在子线程中进行,因为网络访问是耗时的操作,可能会导致ANR(application not response应用无响应)Android中常见的耗时操作有:请求网络,大文件的拷贝,数据库的操作等。解决:将该耗时的操作放在子线程中执行原创 2017-09-27 14:57:04 · 604 阅读 · 0 评论 -
类似手机管家中火箭升空的效果
1、首先找四张图片并放在drawable-hdpi目录下2、编写主activity,放两个按钮即可,一个用来开启火箭,一个用来关闭火箭。因为火箭可以看作是没有界面的activity,所以在服务里面写。<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http原创 2018-01-29 14:37:53 · 291 阅读 · 0 评论 -
Found 2 versions of android-support-v4.jar in the dependency list,The type android.support.v4.app.Fr
1、 Found 2 versions of android-support-v4.jar in the dependency list, but not all the versions are identical (check is based on SHA-1 only at this time). All versions of the libraries must be the same...原创 2018-03-07 07:36:17 · 5493 阅读 · 0 评论 -
Android studio离线安装genymotion及创建Android模拟器
1,下载安装genymotion模拟器地址:https://www.genymotion.com/download/当然你要注册一个它的账号才能下载,下面也有我的分享链接下载完后双击安装,安装过程就不多说了。打开genymotion模拟器,准备添加一个android 设置,需要登录当你输入正确的用户名和密码之后,出现network error问题时。有三种解决方法。第一种:关掉windows防火墙...原创 2018-03-28 09:20:55 · 2120 阅读 · 1 评论 -
android 修改标题栏文字居中
android修改ToolBar的title文字居中及注意事项1、先创建一个布局文件title_bar.xml,里面就是标题栏的内容,根据自己需求来调整 <?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/a...原创 2018-09-16 08:14:39 · 19982 阅读 · 4 评论