*11-09 11:48:38.558 13887-13900/? W/System.err: at android.view.WindowManagerGlobal.getWindowManagerService(WindowManagerGlobal.java:177) 11-09 11:48:38.559 13887-13900/? W/System.err: at android.view.ViewConfiguration.<init>(ViewConfiguration.java:…
W/System.err: java.net.ConnectException: Connection refused 前台访问后台时,出现访问被拒绝情况:W/System.err: java.net.ConnectException: Connection refused 问题出在HttpURLConnection的URL上面,测试三种url"localhost:8008/……""127.0.0.1:8008/……""后台所在的服务器的IP地址IP:80…
转自: http://blog.csdn.net/brokge/article/details/8536906 setTag是android的view类中很有用的一个方法,可以用它来给空间附加一些信息,在很多场合下都得到妙用. setTag(Object tag)方法比较简单,这里主要谈一谈带两个参数的setTag方法. 官方的api文档中提到:“ The specified key should be an id declared in the resources of the applica…
AndroidManifest.xml 中加上: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />…
一般情况下,我们在编写android代码的时候,我们会将一些耗时的操作,比如网络访问.磁盘访问放到一个子线程中来执行.而这类操作往往伴随着UI的更新操作.比如说,访问网络加载一张图片 new Thread() { @Override public void run() { try { URL url = new URL(path); HttpURLConnection connection = (HttpURLConnection) url .openConnection(); // 设置请求方…
1,当调用远程接口进行网络通信时,报如下错误: W/System.err: java.net.UnknownServiceException: CLEARTEXT communication to 10.240.35.113 not permitted by network security policy 这是因为新的保护机制对于仅使用安全通信的应用,Android 6.0 Marshmallow(API 级别 23)引入了两种机制来解决回退到明文通信的问题:(1) 在生产/安装库中,禁止明文通…
因为跟博主碰到了一样的问题,所以记录一下分析原理 原文链接:https://www.jianshu.com/p/b0364074288a 首先,先介绍下背景环境,第一,是Android7.0,其次,要屏蔽home键,先上下出问题的代码 private void testWindow() { AlertDialog d = new AlertDialog.Builder(this) .setPositiveButton("ok", new DialogInterface.OnClickL…
学习<第一行代码>的时候,出现的错误. java.lang.RuntimeException: Unable to start receiver com.example.sevenun.littledemo.receiver.ForceOfflineReceiver: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@5e2d85a -- permissi…
本文结合一些周知的概念和源码片段,对View动画的工作原理进行挖掘和分析.以下不是对源码一丝不苟的分析过程,只是以搞清楚Animation的执行过程.如何被周期性调用为目标粗略分析下相关方法的执行细节,最终贯穿View动画实际发生的一切. View动画使用 Android提供了属性动画(property animation).帧动画(frame-by-frame animation)和View动画( tweened animation:补间动画),View动画的使用相对简单,但又不像真正意义上的…
========= 5.0     android异常“android.view.InflateException: Binary XML file line # : Error inflating class” 今天用到viewPager写了个小demo测试FragmentStatePagerAdapter和FragmentPagerAdapter的区别,忽然报出了“android.view.InflateException: Binary XML file line # : Error in…