赞
踩
Error inflating class android.support.design.widget.FloatingActionButton
将android:backgroundTint="#ffffff"
换成app:backgroundTint="#ffffff"
The activity must be exported or contain an intent-filter
点击下拉框选择app,即可运行
A/chromium: [FATAL:jni_android.cc(243)] Please include Java exception stack in crash report
因为的 log 日志 bug 的颜色我设置为红色,这次闪退是个紫色 好生奇怪,遇到 bug 第一反应就是去百度;但是度娘的给我的答案不是我想要的。 最后经过分析 log 日志。
js 交互时,拦截 js 弹窗 拿出来的 message 截取字符串少截取 一位 将 “:”和一堆数字,一起进行了Integer.parseInt(deviceId)
操作,导致。
调整截取。
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 9657 (Thread-728)
由于 Android 通过嵌套webView 方式进行混合开发,导致手机软件内部 webview 使用的是手机自带的浏览器内核,加之我家 JS 兄弟代码有点窝囊,出现 该问题,国内开发者已经无法解决该问题,后经过谷歌查明原因,由于 JS内部代码出现的部分出现不合理调用,导致与手机内核产生 bug 猛一看以为是开个线程即可解决,但不能开工作线程加载url 产生矛盾。所以这个问题解决需要触及底层。。。。巴拉巴拉一堆,那就没办法解决了。
我遇到该问题是 : url 内的网页有百度的热力图,然后只有 vivo 加载该 url 就崩溃,其他设备没有任何,事情。后查明, vivo 浏览器内核为google的内核,其他的大部分设备为 Webkit 。
真的无法解决的话,那我就不写了,辞职就好了嘛。 解决办法为项目内引入 腾讯X5 内核,加载该url 使用腾讯内核即可完美解决该问题。
由于集合在遍历的过程中进行了了删除操作,导致遍历之前集合数量的 size 假设为 7 遍历之后为 6 导致,前后不一致,出现bug
以map为例
Set<Entry<String, Integer>> set=map.entrySet();
Iterator<Entry<String, Integer>> iterator=set.iterator();
while(iterator.hasNext()){
Entry<String, Integer> entry=iterator.next();
String name=entry.getKey();
if(name.contains("1")){
iterator.remove();
}
}
小米 MIX 2 产生该报错 ,原因是:只有不透明的全屏activity可以自主设置界面方向。 也就是说,dialog Activity 在这里不能使用 控制保持屏幕状态一直未竖屏,也就是给Activity同时设置了 android:screenOrientation="" 和 true。
3、解决方案:删除AndroidManifest中相应Activity的 android:screenOrientation=""属性;或者删除相应Activity的theme中true属性。
可以详细阅读:安卓开发——android8.0应用崩溃,报错: Only fullscreen opaque activities can request orientation
Binary XML file line #15
(1)、Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class android.webkit.WebView;
(2)、Caused by: java.lang.reflect.InvocationTargetException;
(3)、Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003;
(4)、Caused by: java.lang.reflect.InvocationTargetException;
(5)、Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003;
(6)、Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003;
厂商底层优化 存在漏洞;
/** * CreateTime:2019/12/6 15:45 * Author: hxd * Content: 为了 解决 vivo 手机 webView 适配问题引入的自定义view * UpdateTime: * UpdateName; * UpdateContent: */ public class VivWebView extends WebView { public VivWebView(Context context) { super(getFixedContext(context)); } public VivWebView(Context context, AttributeSet attrs) { super(getFixedContext(context), attrs); } public VivWebView(Context context, AttributeSet attrs, int defStyleAttr) { super(getFixedContext(context), attrs, defStyleAttr); } @SuppressLint("ObsoleteSdkInt") private static Context getFixedContext(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return context.createConfigurationContext(new Configuration()); } else { return context; } }
自定义 一个 WebView 替代系统原生的 WebView 再次运行可以解决 该问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。