
Exception异常处理收集
文章平均质量分 67
Exception异常处理收集
songzi1228
代码一敲,烦恼全消。
展开
-
Android Studio: URI is not registered(Settings | Languages & Frameworks | Schemas and DTDs)
Android Studio: 拷贝以及修改一些文件时,出现一些问题:解决方案:clean project原创 2018-05-10 15:23:41 · 2043 阅读 · 3 评论 -
warning: Ignoring InnerClasses attribute for an anonymous inner class
warning: Ignoring InnerClasses attribute for an anonymous inner class(org.apache.commons.httpclient.HttpMethodBase$1) that doesn't come with anassociated EnclosingMethod attribute. This class was ...原创 2016-10-09 11:37:57 · 1149 阅读 · 0 评论 -
Error:Execution failed for task ':clean'. > Unable to delete directory :\build\intermediates
Error:Execution failed for task ':clean'. > Unable to delete directory :\build\intermediates我用的是Android studio,之前就一直碰到这个问题,用的一种笨方法,就是重启电脑,一般就可以运行程序了。但是这样太麻烦了。今日又重新查找,在这里http://stackoverflow.com/...原创 2016-07-05 09:16:57 · 5278 阅读 · 4 评论 -
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41cb7c68)
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41cb7c68)之前碰到过此问题,不知道有没有解决,稀里糊涂的过去了。今日又碰到此问题。问题描述:写了一个调用接口的方法,一调用此方法,程序就崩溃,并在logcat里出现上面这句话。翻译一下(线程退出异常。)在此方法上加入try catch 发...原创 2016-05-25 16:18:29 · 4349 阅读 · 0 评论 -
java.lang.IllegalArgumentException: Failed to find configured root that contains .....
参考文章:FileProvider 的使用今天写到相机拍照,报出如下异常:java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.gs.common/files/Pictures/JPEG_20181030_17...原创 2018-10-30 17:52:14 · 23278 阅读 · 3 评论 -
android异常解决步骤:
遇到此类报异常的问题:一、去网上搜索;二、debug;今天就是步骤弄反了,结果耽误不少时间,特此记录。原创 2018-10-30 17:54:05 · 271 阅读 · 0 评论 -
Rendering Problems The following classes could not be instantiated:
问题描述:一个项目一打开xml布局文件,就会出现Rendering Problems,如下:解决办法:Theme主题方面的问题:将原来的主题<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">改为:<style name="AppTheme" parent="Base....原创 2018-12-24 16:30:47 · 536 阅读 · 1 评论 -
安卓开发——android8.0应用崩溃,报错: Only fullscreen opaque activities can request orientation
Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation字面意思就是说:只有不透明的全屏activity可以自主设置界面方向。网上搜了搜,发现不是个例,这个问题出现在android8.0以上。原因是我们给Activity同时设置了 andr...转载 2019-02-20 16:35:47 · 413 阅读 · 0 评论 -
Installation failed with message Invalid File:
Installation failed with message Invalid File: D:\AS_workspace\AS3.0\as3_workpro\phzzys_pro\phzzys0117\app\build\intermediates\split-apk\debug\slices\slice_9.apk.It is possible that this issue is res...原创 2019-03-13 11:21:30 · 570 阅读 · 0 评论 -
java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace availabl
java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace availabl新建的项目,运行报出以上错误。解决办法: 关掉 Instant RunFile -> Settings -> Build, Execution, Deployment ->...原创 2019-03-30 09:27:52 · 2436 阅读 · 1 评论 -
java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check
问题描述:在Android Studio3.0.1上运行一个java类的main函数报出一下错误:Error:Gradle: java.util.concurrent.ExecutionException: Information:Gradle: Executing tasks: [:app:assembleDebug]Information:Gradle: BUILD FAILED ...原创 2019-04-01 10:26:16 · 792 阅读 · 1 评论 -
Android报错:android.view.InflateException: Binary XML file line #0: Error inflating class TextView
报错信息:android.view.InflateException: Binary XML file line #0: Error inflating class TextView报错截图:报错定位代码行:报错xml文件:原因:资源文件shape_new_message.xml在drawable-v24文件夹下,而不在drawable文件夹下解决办法:将资源文件s...转载 2019-05-09 09:54:38 · 350 阅读 · 0 评论 -
android.app.RemoteServiceException: Bad notification for startForeground
android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 co...原创 2019-06-24 10:48:59 · 4495 阅读 · 0 评论 -
有关详细信息, 请使用 -Xlint:unchecked 重新编译。
warning: Ignoring InnerClasses attribute for an anonymous inner class(org.apache.commons.httpclient.HttpMethodBase$1) that doesn't come with anassociated EnclosingMethod attribute. This class was ...原创 2016-10-09 11:38:29 · 9220 阅读 · 0 评论 -
'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 2
warning: Ignoring InnerClasses attribute for an anonymous inner class(org.apache.commons.httpclient.HttpMethodBase$1) that doesn't come with anassociated EnclosingMethod attribute. This class was ...原创 2016-10-09 11:39:18 · 1422 阅读 · 0 评论 -
Couldn't read row 0, col -1 from CursorWindow, Cursor initialization error
SVN上数据库有所改动,更新后,出现Couldn't read row 0, col -1 from CursorWindow, Cursor initialization error 问题。解决办法:覆盖原来的数据库后,调用 file.delete(),把原来的删掉,然后注释掉file.delete(),在重新运行就可以了。 ...原创 2016-10-09 11:42:53 · 655 阅读 · 0 评论 -
Rendering Problems Couldn't resolve resource @dimen/y20
Rendering Problems Couldn't resolve resource @dimen/y20 (2 similar errors not shown) "@dimen/y20" in attribute "textSize" is not a valid format. (Edit) Tip: Try to refresh the layout.项目里拷贝了鸿杨大神的...原创 2018-05-09 16:14:27 · 842 阅读 · 1 评论 -
Failed to resolve:com.android.support:appcompat-v7:报错处理
今天新建了一个项目,报出以上错误,特此记录。以下为报错内容:Error: Failed to resolve: com.android.support:appcompat-v7:27.+Install Repository and sync projectShow in FileShow in Project Structure dialog一、原因分析:这其实是编译工具冲突...原创 2018-05-09 11:37:01 · 2212 阅读 · 0 评论 -
com.android.dex.DexIndexOverflowException:(包括Android Studio3.0之前和之后解决方案)
目录AS2.2解决方案:三步一、项目目录下build.gradle 下的defaultConfig添加multiDexEnabled true二、项目目录下build.gradle 下的dependencies三、AndroidManifest.xml中添加 android:name = "android.support.multidex.MultiDexApplication"...原创 2018-05-04 15:27:49 · 323 阅读 · 0 评论 -
It is possible that this issue is resolved by uninstalling an existing version of the apk
perm=xx.xx.xx.permission.xxx pkg=com.xx.xxxx.It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.WARNING: Uninstalling...原创 2018-05-02 14:51:32 · 398 阅读 · 0 评论 -
Android Studio, Element path must be declared for FileProvider
问题已在此得到解决 点击打开链接不过因为是英文网站,特此翻译一下方便大家。需求:在res目录新建xml文件夹,创建provider_paths.xml文件如果你在android模式下新建,是会报错的:Element path must be declared解决方案:改为project模式,在res下有个xml文件下新建provider_paths.xml,即res/xml/pr...原创 2017-11-30 15:12:54 · 547 阅读 · 0 评论 -
java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/B...原创 2017-07-26 17:08:07 · 5710 阅读 · 0 评论 -
Error:Could not find wechat-sdk-android-with-mta.jar
今天,在项目放入baidu_mtj_3.8.0.2.jar(关于百度统计)后,项目报出了这个错误:Error:Could not find wechat-sdk-android-with-mta.jar (com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.3.4).Searched in the following locations:...原创 2017-07-20 15:32:29 · 2037 阅读 · 0 评论 -
java.net.SocketTimeoutException
java.net.SocketTimeoutExceptionat java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)at java.net.PlainSocketImpl$PlainSocketInp...原创 2017-04-20 16:42:16 · 2314 阅读 · 0 评论 -
requestLayout() improperly called by android.widget.TextView
问题描述:出现以下警告:requestLayout() improperly called by android.widget.TextView{...} during second layout pass: posting in next framerequestLayout() improperly called by android.widget.TextView{...} during...原创 2017-03-13 09:23:08 · 6545 阅读 · 0 评论 -
chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojo
chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver代码如下:webView = (WebView) findViewById(R.id.webView);WebSettings webSet...原创 2017-03-02 09:24:46 · 14434 阅读 · 7 评论 -
IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.IllegalState:非法状态。在调用cursor查询数据库是出现此错误。返回...原创 2016-12-26 14:51:28 · 1525 阅读 · 0 评论 -
the SDK platform-tools version(xxx) is too old to check APIs cimpiled with API xxx.
the SDK platform-tools version(23.1) is too old to check APIs cimpiled with API 24.今天导入新项目后遇到此问题,进入settings-->Android SDK -->SDK Tools-->Android SDK Tools 升级到最新版本即可解决此问题。接下来又遇到:Error:java...原创 2016-12-21 11:44:27 · 5575 阅读 · 0 评论 -
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
直译过来就是:边界越出错误,无效的索引为0,用的arraylist实例中,size是0,就是长度为0. 情景:调一个接口,里面是有数据的,需要展示在listview上,但是却报出以上“边界越出错误”,说明自己所获取的数据为0.经过查找,根据logcat所提示的出错位置,进行debug,发现在adapter中获取得数据出错了。进行改正,解决了。 ...原创 2016-10-25 09:38:50 · 770 阅读 · 0 评论 -
Android 异常:javax.net.ssl.SSLException: hostname in certificate didn't match
相关文章:Android 异常:javax.net.ssl.SSLException: hostname in certificate didn't matchapp用的第三方联网框架AsyncHttpClient,服务器是Https请求的,我按照以上文章的方法,在请求之前加一句话SSLSocketFactory.getSocketFactory().setHostnameVeri...原创 2019-07-16 17:45:18 · 373 阅读 · 0 评论