
Android 报错处理
KWMax
Android/跨端/iOS
展开
-
Android 报错处理:ActivityNotFoundException: No Activity found to handle Intent
场景在跳转外部浏览器的时候val uri: Uri = Uri.parse(url)val intent = Intent(Intent.ACTION_VIEW, uri)activity.startActivity(intent)发现部分机型有时会闪退,报错 ActivityNotFoundException: No Activity found to handle Intent可能原因外部没有可以处理该intent的组件。可能是外部浏览器初始化的问题。因为在出现闪退几次之后在进行调用,发原创 2020-12-24 21:14:13 · 4978 阅读 · 0 评论 -
Android 报错处理:Annotation processors must be explicitly declared now
今天跑一个项目的时候,运行报错:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annota...原创 2019-10-23 22:00:45 · 274 阅读 · 0 评论 -
Android 报错处理:"xxx" is translated here but not found in default locale
可能原因:可能是用了第三方库有国际化资源,检查到国际化资源包和普通包不一样。找不到对应的本地化字符串。解决方案:Stack Overflow :https://stackoverflow.com/questions/23821554/auth-client-using-bad-version-title-is-translated-here-but-not-found-in-def...原创 2019-07-26 14:21:45 · 7767 阅读 · 1 评论 -
Android 报错处理:not attached to window manager
not attached to window manager有许多场景发生最近在dialog上碰到此问题WindowManager: android.view.WindowLeaked: Activity com.XXXXXX.LoginActivity has leaked window DecorView@613753a[系统信息] that was originally added...原创 2019-07-17 16:56:28 · 22321 阅读 · 0 评论 -
Android 报错处理:read time out 或者 could not download ... could not get resource ...could not Get ...
可能原因:网络问题,被墙,配置源地址不存在该文件解决方案:1、关闭代理 No Proxy,注释掉gradle.properties 文件下配置的网络代理2、在项目的 Gradle 文件里,修改配置源(将 google() 和 jcenter() 换成下列中间几项),再sync,make projectbuildscript { repositories {...原创 2019-07-17 15:34:41 · 924 阅读 · 4 评论 -
Android 报错处理:Android resource linking failed
Android resource linking failedOutput: E:\ASWorkSpace\Temp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerR...原创 2019-07-17 15:48:27 · 4838 阅读 · 0 评论 -
Android 报错处理:IllegalStateException: Fragment not attached to Activity
可能原因:这种应该是偶发性的问题,原因再与Fragment还没有Attach到Activity时,调用了如getResource()等,需要上下文Content的函数。解决方法:1、等将调用的代码写在OnStart();2、增加isAdd判断,见 Stack Overflow ->https://stackoverflow.com/questions/687032...原创 2019-07-17 15:44:14 · 562 阅读 · 0 评论 -
Android 报错处理:All flavors must now belong to a named flavor dimension,Learn more at https://d.android
查看链接 ->https://d.android.com/r/tools/flavorDimensions-missing-error-message.html翻看文档,有一段话:Error:All flavors must now belong to a named flavor dimension. The flavor 'flavor_name' is not assi...原创 2019-07-17 15:41:51 · 967 阅读 · 0 评论 -
Android 报错处理:Manifest merger failed with multiple errors
可能原因:1、SDK版本不一致2、其他配置错误解决方案:1、检查SDK,保持一致2、其他原因,可在 Terminal 输入命令行:gradlew processDebugManifest --stacktrace或者打开右下角 Gradle console看到编译日志,再依据日志判断修改...原创 2019-07-17 15:37:52 · 587 阅读 · 0 评论