
android报错
圣剑Jay
这个作者很懒,什么都没留下…
展开
-
AndroidStudio 代码报错(引入红色),但可正常运行解决方法(4种方式)
AndroidStudio 崩溃,异常,电脑蓝屏等情况下有时会引发代码报错,但又能正常编译。整理出了四种方法,供大家参考。一、自带清除缓存点击AndroidStudio菜单File -> Invalidate Caches/Restar… ,在弹出的对话框中点击Invalidate and Restar。等待AS清理并自动重启。二、删除user目录下.AndroidStudio中的文件关闭AndroidStudio,进入C:\Users\xUser.AndroidStudio3.1(3.转载 2021-07-16 00:00:11 · 1817 阅读 · 0 评论 -
AndroidStudio4.1不提示编码错误,运行时才会报错
AndroidStudio4.1不提示编码错误,运行时才会报错第一种情况在C:\Users\Administrator\AppData\Roaming\Google\AndroidStudio4.1目录下删除plugins文件,然后重启androidstudio第二种情况可能是androidstudio的省电模式被开启了,只需要把省点模式关掉即可,如图的 Power save Mode给取消选中就行了...转载 2021-05-31 23:19:45 · 197 阅读 · 0 评论 -
Android 8.0 崩溃问题记录:Only fullscreen opaque activities can request
记录一下最近App在Android 8.0 版本发生闪退的一个问题。Caused by: java.lang.IllegalStateException:Only fullscreen opaque activities can request orientation1.起因为了解决app启动页白屏或者黑屏,把启动页Activity设置为全透明的风格:<item name="android:windowIsTranslucent">true</item>于是,悲剧发转载 2021-04-02 20:10:01 · 629 阅读 · 0 评论 -
Unable to resolve dependency for ‘app@externalNativeBuild/compileClasspath‘: Could not resolve :XXX
1. ndk传统方式,,,主工程build.grale文件一改动代码,同步项目,所有的module工程立刻全部报下面这个错,必须rebuild project工程才能正常运行,实在是影响开发。Unable to resolve dependency for 'app@externalNativeBuild/compileClasspath': Could not resolve :XXX主工程配置如下:android { compileSdkVersion 27 default转载 2021-03-08 23:49:10 · 277 阅读 · 0 评论 -
org.json.JSONException: Unterminated object at character 103
org.json.JSONException: Unterminated object at character 103 of {"status":"ok","message":"xxxxxx","time":2020-12-02 10:36:24}错误原因: 所解析的json数据格式有错(数据中含有特殊字符、或符号为中文状态下输入、时间的格式需要转化)解决办法:规范化数据格式上面的time字段对应的值 不是字符串造成bug的。"time": "2020-12-02 10:36:24"..转载 2020-12-25 22:17:58 · 1251 阅读 · 0 评论 -
CLEARTEXT communication to xx not permitted by network security policy
ok http3 + retrofit 网络请求,在Android9.0手机上请求失败,报错:CLEARTEXT communication to " " not permitted by network security policy原因 :Android P以后网络访问安全策略升级,限制了非加密的流量请求1.降低目标版本,app/build.gradle中targetSdkVersion 设置27或以下。2.http请求改成https。3.添加res/xml/network.xml文件名可自拟转载 2020-12-05 18:06:57 · 571 阅读 · 0 评论 -
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
android studio运行报错Invoke-customs are only supported starting with Android O (–min-api 26)Invoke-customs are only supported starting with Android O (--min-api 26)Stack trace:com.android.tools.r8.a: Invoke-customs are only supported starting with Android转载 2020-11-26 16:20:18 · 2849 阅读 · 0 评论 -
INSTALL FAILED CONFLICTING PROVIDER问题完美解决方案
在安装Android应用时出现 INSTALL FAILED CONFLICTING PROVIDER 问题,是不是感觉很抓狂呢,下面就跟大家分享一下出现这个问题的原因及解决方案。问题原因在Android中authority 要求必须是唯一的,比如你在定义一个provider 时需要为它指定一个唯一的authority 。如果你在安装一个带有provider 的应用时,系统会检查当前已安装应用的authority 是否和你要安装应用的authority 相同,如果相同则会弹出上述警告,并且安装失..转载 2020-10-11 23:52:55 · 727 阅读 · 0 评论 -
Add Google Maven repository and sync project
用Android studio导入一个项目时,可以会报Add Google Maven repository and sync project有可能的解决方法如下:在项目的build.gradle中修改如下:buildscript { repositories { maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} //jcenter() google()转载 2020-09-28 15:39:56 · 2200 阅读 · 0 评论 -
Plugin with id ‘com.android.application‘ not found.
Plugin with id ‘com.android.application’ not found.原来settings.gradle 文件这边没有把目标文件导入进来,结果他就找不到了。。include ':app-phone'这个导入进来,,一切ok原创 2020-09-01 23:06:37 · 267 阅读 · 0 评论 -
failed to read PNG signature: file does not start with PNG signature
打开安卓项目发现drawable目录有张图片无法显示,提示image not loaded try to open it externally to fix format problem如果打包会提示failed to read PNG signature: file does not start with PNG signature找了个第三方网站,图片重新转换生成一张新的png图片替换掉。。立刻都好了参考https://blog.csdn.net/ohdajing/article/detai原创 2020-08-19 23:43:47 · 601 阅读 · 0 评论 -
Lint found fatal errors while assembling a release target的解决方案
之前执行代码一直没有问题,打debug包也不会报错,然后昨天上线打正式包的时候,突然就报了一个匪夷所思的问题Lint found fatal errors while assembling a release target.To proceed, either fix the issues identified by lint, or modify your build script as follows:... android { lintOptions { checkR转载 2020-07-18 19:15:07 · 1110 阅读 · 0 评论 -
Received close_notify during handshake
问题存在原因:这是Android编译错误,jcenter里面的东西下载不了引起的。问题解决:在项目的build.gradle文件中将jcenter()换成阿里的源,具体示例代码如下。修改之后再重新Sync Project即可。buildscript { ext.kotlin_version = '1.3.50' repositories { google() // jcenter() maven{ url'http://maven.aliy转载 2020-07-17 14:52:55 · 340 阅读 · 0 评论 -
java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController
java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController原创 2020-06-02 22:14:32 · 903 阅读 · 0 评论 -
Android Studio中Junit单元测试使用JSON对象异常的问题
Android Studio 2.0 Beta5中使用本机单元测试时,遇到使用JSONObject代码时抛出异常:比如:JSONObject jsonObject = new JSONObject();报异常:java.lang.RuntimeException: Method put in org.json.JSONObject not mocked. See https://sites.google.com/a/android.com/tools/tech-docs/unit-testing-sup转载 2020-06-01 00:36:58 · 529 阅读 · 0 评论 -
android.os.TransactionTooLargeException: data parcel size 551728 bytes问题原因与解决
2020-04-07 17:03:05.882 1124-1708/? E/ActivityManager: Second failure launching com.*****.****/com.werb.pickphotoview.PickPhotoPreviewActivity, giving up android.os.TransactionTooLargeException: d...转载 2020-04-08 00:06:25 · 6151 阅读 · 0 评论