【android 异常汇集】
SteamPY
这个作者很懒,什么都没留下…
展开
-
andriod 4.0以上版本添加了 android:configChanges="keyboardHidden|orientation"不调用onConfigrationChange方法的解决办法
andriod 4.0以上版本添加了 android:configChanges="keyboardHidden|orientation"不调用onConfigrationChange方法的解决办法 我们首先看看Android4.0以前版本是如何调用onConfigrationChange方法的:1. 首先在manifest.xml文件里面添加权限: 2. 然后在原创 2015-03-11 10:30:16 · 5474 阅读 · 0 评论 -
拨号键盘匹配联系人问题
拨号键盘匹配联系人问题一、问题现象 拨号键盘不能通过快速检索通讯录中联系人名字的汉字首字母(简拼)实现通讯录匹配。二、现象分析 手机存有1505个联系人,SIM卡存有115个联系人,SIM卡存有“紫天”的联系人,拨号键盘输入“98”,通过号码“98”来搜索“紫天”这个号码,没有搜索出来。由于“紫天”是比较靠后的联系人,超过的搜索的范围2500(这当中包括手机、住宅等联系方式原创 2014-04-28 11:31:36 · 2276 阅读 · 0 评论 -
androidの自定义控件View在Activity中使用findByViewId得到结果为null,解决方法。。
androidの自定义控件View在Activity中使用findByViewId得到结果为null1. 大家常常自定义view,,然后在xml 中添加该view 组件。。如果在Activity 中使用findByViewId 方法获取该view 时候,返回对象总为空 。。。 xml 代码 <com.infzm.slidingmenu.demo.view.CustomSur原创 2015-09-28 10:27:17 · 4629 阅读 · 0 评论 -
Android异常汇集----1. android.view.InflateExce: Binary XML file line #6: Error inflating class com.examp
Android运行时异常android.view.InflateException: Binary XML file line #6: Error inflating class com.examp1. 自定义view,时候出现了该异常问题,在网上查了很久,然后对比代码。 总结网上以及自己分析问题如下: 1. 引用类名问题:自定义了一个View,将他用于布局文件原创 2015-02-04 15:54:24 · 27724 阅读 · 3 评论 -
Android异常汇集----2. org.json.JSONException: Unterminated string at character
JSON经典异常:org.json.JSONException: Unterminated string at character异常情景:JSON数据格式进行解析;出现异常完整信息如下:06-12 13:08:09.273: W/System.err(31618): org.json.JSONException: Unterminated object at原创 2015-06-12 13:12:29 · 6298 阅读 · 0 评论 -
Android异常汇集----3.java.lang.NoClassDefFoundError: Class not found using the boot class
android 异常:java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack availableCaused by: java.lang.ClassNotFoundException: Didn't find class "com.blueberry.ibeacon.activi原创 2015-10-22 13:08:37 · 28203 阅读 · 5 评论 -
Android异常汇集----4. Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please
重装操作系统后,要重新配置Android开发环境。配置成功后,添加原本项目时却出现了错误!Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.解决方法:1.项目右键 ->and原创 2015-05-12 15:47:15 · 2301 阅读 · 0 评论 -
Android异常汇集----4. Jar mismatch! Fix your dependencies
Android异常汇集----4. Jar mismatch! Fix your dependencies本节正文1. 异常描述 在开发Android项目的时候,有时需要引用多个项目作为library。在引用项目的时候,有时会出现“Jar mismatch! Fix your dependencies”错误。 即 某一项目,需要引用别的项目作为lib 文件., 然后在控原创 2016-01-27 18:57:50 · 742 阅读 · 0 评论 -
Android异常解决--A WebView method was called on thread 'JavaBridge'. All WebView methods must be called
Android异常解决--A WebView method was called on thread 'JavaBridge'. All WebView methods must be called android端调用js. 使用webView.loadUrl("javascript: alert(" + data +")"); 出现异常.异常log如下: W/WebView原创 2016-07-07 18:42:43 · 9404 阅读 · 0 评论 -
Android异常汇集----常见异常总结(一)
1.手机内存不足是,有可能出现的问题[2013-03-13 17:32:24 - DBtest] Installing DBtest.apk...[2013-03-13 17:32:24 - DBtest] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE[2013-03-13 17:32:24 - DBtest] Plea原创 2014-12-24 13:51:06 · 3707 阅读 · 1 评论 -
Android异常--6. java.lang.IndexOutOfBoundsException: Invalid index 1 ,size is 1
Android异常汇集----6. java.lang.IndexOutOfBoundsException: Invalid index 1, size is 11.异常描述 实现listview上拉刷新操作,在 数据清空 list.clear(); 和 list.addAll(list); 偶尔出现此问题,出现异常完整信息如下:原创 2016-08-19 15:44:07 · 12795 阅读 · 1 评论 -
Android studio运行出现错误:IllegalArgumentException: Unable to locate adb
更新安装sdk, 运行出现错误,做个笔记。sdk中的platform-tools没装 导致无法使用Tools -Android - SDK Manager -SDK Tools -Android SDK platform然后把这个装上去就好了。希望对遇到这方面问题的朋友有帮助。关于sdk更新慢的问题,我这里有一个快速更新sdk的方法-----原创 2017-01-10 12:55:43 · 5608 阅读 · 1 评论 -
Androidの4.0 MTK bug积累
Androidの4.0 MTK bug积累1.【联系人】编辑一个联系人的头像通过相机拍照.保存后进入图库查看会生成两张图片 在package/app/Camera/src/com/android/camera/actor/PhotoActor.java doAttach()中,取消 setSaveRequest(data); 这个方法保存图片的,在doAttac原创 2013-12-16 14:54:30 · 775 阅读 · 0 评论 -
android 4.0版本手机接受多条短信分析
手机接受多条短信分析1. 空闲中整理下笔记,先上android 4.0 短信接收多条异常问题处理,再写 android 4.5 的。 实例:android4.0版本以及以前版本【信息】对比机发送一条短信,手机显示收到2条信息 测试机接受多条短信时,有时会接受到4,5条不定数目的短信信息。时间间隔不一。2. 短信接受基本流程 分析一下流程原创 2015-01-27 11:00:22 · 1432 阅读 · 0 评论 -
Android 异常解决方法汇总
Android 异常解决方法汇总 (1)异常:Android中引入第三方Jar包的方法(java.lang.NoClassDefFoundError解决办法)1、在工程下新建lib文件夹,将需要的第三方包拷贝进来。2、将引用的第三方包,添加进工作的build path。选中jar包->Build Path3、(关键的一步)将lib设为源文件夹。如果不设置,则程序编译可以通过原创 2015-04-08 09:45:31 · 1818 阅读 · 0 评论 -
android.view.InflateException: Binary XML file line #2: Error inflating class 的解决方法
android.view.InflateException: Binary XML file line #2: Error inflating class 的解决方法1.看下log信息java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.xs8.app/cn.xs8.app.activity.news原创 2015-03-18 19:25:20 · 7132 阅读 · 0 评论 -
androidの异常:java.lang.IllegalStateException: ImageLoader must be init with configuration befor 错误解决方法
androidの异常:java.lang.IllegalStateException: ImageLoader must be init with configuration befor 错误解决方法最近开发过程中用到了开源项目Android-Universal-Image-Loader。在程序开发之前在CSDN的文章里看到的有Android-Universal-Image-Loa原创 2015-04-09 16:54:53 · 5054 阅读 · 0 评论 -
Androidの解决ViewFlipper与ScrollView滑动响应事件拦截的问题
Androidの解决ViewFlipper与ScrollView滑动响应事件拦截的问题1. 使用ViewFlipper作为水平滑动容器;需要使用ScrollView作为垂直滑动容器。 Android ViewFlipper添加ScrollView后不能滑动了原因是因为activity没有处理滑动效果。 网上都说是 重写 public boolean dispatchTouchE原创 2015-04-26 20:45:41 · 1482 阅读 · 0 评论 -
Android Webview 加载一个页面时,报错 java.lang.Throwable: EventHub.removeMessages(int what = 105) is not suppo
java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.1. Android Webview 加载一个页面时,报错 java.lang.Throwable: EventHub.removeMessages(int what = 1原创 2015-04-28 14:51:58 · 1513 阅读 · 0 评论 -
java.lang.Throwable: Warning: A WebView methods must be called on the same thread.
java.lang.Throwable: Warning: A WebView methods must be called on the same thread.出现的问题如下所示:04-28 10:35:45.464: W/webview(2495): java.lang.Throwable: Warning: A WebView method was called on threa原创 2015-04-28 15:06:52 · 3039 阅读 · 0 评论 -
android 中添加字体:java.lang.RuntimeException: native typeface cannot be made
关于android自定义字体我想自行定义内容的字体,用了以下语句:TextView tv = (TextView)findViewById(R.id.maintitle); //换字体Typeface face=Typeface.createFromAsset(getAssets(), "fonts/HYyy.ttf");tv.setTypeface(face);在原创 2015-05-15 19:29:36 · 3279 阅读 · 0 评论 -
eclipse导入项目:Unable to execute dex: Multiple dex files define 解决方法
eclipse导入项目:Unable to execute dex: Multiple dex files define 解决方法问题发生概述: 程序编译正常,在用Eclipse调试执行时,报错Unable to execute dex: Multiple dex files define,因为以前也没有遇到这类错误,首先便尝试万能纠错发,如下方法一,也是上网搜索众多解决方案之原创 2015-05-09 11:24:24 · 926 阅读 · 0 评论 -
Android 项目添加引用library项目的时候出错
问题描述:android 中一个项目A, 引用另一个项目B,而B作为library 引入的。。 1. B 作为library项目直接导入Eclipse 出现错误,如果代码都没有错误,还有红色提示时候 解决路径 :1)检查你library的targetSDK和你的工程的targetSDK,保证你的工程targetSDK要一致或者更高原创 2015-05-14 16:34:59 · 768 阅读 · 0 评论 -
AndroidのScrollView中嵌套ListView时显示一行解决方法
在ScrollView中嵌套ListView时,ListView只能显示一行多一点.经过验证,简单有效,在listview.setAdapter()之后调用Utility.setListViewHeightBasedOnChilren(listview)就Okay 了。[java] view plaincopyprint?public原创 2015-05-15 15:44:51 · 581 阅读 · 0 评论 -
CalledFromWrongThreadException: Only the original thread that created a view
在分析Android消息机制之前,我们先来看一段代码: [html] view plaincopyprint?public class MainActivity extends Activity implements View.OnClickListener { private TextView stateText;转载 2015-05-18 15:47:55 · 1637 阅读 · 0 评论 -
AndroidのListView包含CheckBox时滑动丢失选中状态的解决
AndroidのListView包含CheckBox时滑动丢失选中状态的解决listview 中,如果有10项,其中手机屏幕显示1-6项,其余的7-10项在屏幕中不可见,得向下滚动后才能看到,这个时候,如果选中1、2项,再滚动到7-10项,之后再滚动回来1-6项,就发现1、2项并未被选中。解决方法: 编写自定义的Adapter,一下是代码部分。、class Listvi原创 2015-06-09 10:41:07 · 995 阅读 · 2 评论 -
android异常总结--java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast t
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams看下如下错误提示:java.lang.ClassCastException: android.widget.LinearLayout原创 2017-01-10 13:18:03 · 11102 阅读 · 0 评论