摘要: 第一种方法: //直接关闭键盘输入法 private void closeInputMethod() { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); boo 阅读全文
posted @ 2017-09-19 17:46 8995 阅读(1782) 评论(0) 推荐(0) 编辑
摘要: Q:Error:Unable to find method 'org.gradle.api.artifacts.Configuration.setExtendsFromA: 1、在你的app-project \ your-app-name \ gradle \ wrapper \ gradle-wr 阅读全文
posted @ 2017-09-13 16:17 8995 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Eclipse ADT中的logcat不显示解决方法: 1.在Eclipse界面中找到DDMS,然后找到device选项卡,在这个选项卡中选择reset adb,如果不行尝试方法2; 2.不用关闭eclipse和模拟器,在Android SDK的tools目录下有个 ddms.bat 批处理文件,运 阅读全文
posted @ 2017-09-11 23:14 8995 阅读(604) 评论(0) 推荐(0) 编辑
摘要: 类中加载的xml中,所自定义组件的包名错误(xml中51行错误;自定义组件包名写错了)。 阅读全文
posted @ 2016-12-16 09:41 8995 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1、调用的资源文件不存在;xml文件中有些控件没有关联引用;把项目缺少的文件加上,包括资源文件,如 values中的strings.xml或者图片等资源。 2、项目中缺少必须的系统文件(比如:default.properties等)。 3、最无奈的方法就是在创建一个程序....把程序一点点拷贝过来。 阅读全文
posted @ 2016-12-16 09:37 8995 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 1、将General-Workspace-Text file encoding 设置成UTF-82、导入项目,如果文件乱码,点文件右键Properties-Resource-Text file encoding,将Other设置成UTF-8 阅读全文
posted @ 2016-12-16 09:33 8995 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 找到子项,在 Window->Prefrences->Java->Code Style->Formatter,点击New新建 Active profile,然后在Comments项中,找到General settings组项,对"Enable block comment formatting"取消勾 阅读全文
posted @ 2016-11-28 19:03 8995 阅读(751) 评论(0) 推荐(0) 编辑
摘要: 有如下log: android.view.InflateException: Binary XML file line #2: Error inflating class com.hankkin.SelectMutiImgDemo.view.SquareLayout at com.king.phot 阅读全文
posted @ 2016-11-11 18:14 8995 阅读(348) 评论(0) 推荐(0) 编辑
摘要: you have to insert 2 lines "StrictMode" on MainActivity Class, example's below: 在onCreate()方法下一行添加StrictMode 例子: public class MainActivity extends Act 阅读全文
posted @ 2016-11-11 18:12 8995 阅读(1476) 评论(0) 推荐(0) 编辑
摘要: 给Manifest加网络权限<uses-permission android:name="android.permission.INTERNET"/> 阅读全文
posted @ 2016-11-11 18:09 8995 阅读(3873) 评论(0) 推荐(0) 编辑