- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 ViewPager 和 TabLayout 的 Activity ,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.AppBarLayout
android:id="@+id/item_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/item_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="0dp"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/item_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.design.widget.TabLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/item_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</android.support.v4.view.ViewPager>
</android.support.design.widget.CoordinatorLayout>
其中一个 fragment 是 WebView。为了在 WebView 滚动时隐藏工具栏,我将 WebView 放在 NestedScrollView 中。
在添加 NestedScrollView 之前,该应用运行良好,但它没有隐藏工具栏。
现在,一旦 WebView 完成加载,应用程序就会在没有 Java 堆栈跟踪的情况下关闭。
fragment 布局如下
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/browser_root"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/browser_loading_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateTintMode="src_atop"
android:indeterminateTint="@color/colorAccent"
android:layout_gravity="center"/>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<WebView
android:id="@+id/browser_webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible">
</WebView>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
当要加载某些内容时,会调用 mWebView.loadUrl。 WebView 有一个客户端,因此当页面加载完成时,Spinner 可见性设置为消失并且 WebView 可见。
Android 监视器显示:
10-25 15:22:12.111 3871-3871/com.tpb.hn I/Browser: loadURL: WebView loading
10-25 15:22:12.113 3871-3871/com.tpb.hn I/cr_Ime: ImeThread is not enabled.
10-25 15:22:12.118 3871-3911/com.tpb.hn I/OpenGLRenderer: Initialized EGL, version 1.4
10-25 15:22:12.118 3871-3911/com.tpb.hn D/OpenGLRenderer: Swap behavior 1
[ 10-25 15:22:12.118 3871: 3911 D/ ]
HostConnection::get() New Host Connection established 0x7ffeeca88c00, tid 3911
10-25 15:22:12.126 3871-3936/com.tpb.hn E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
10-25 15:22:12.136 3871-3936/com.tpb.hn I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
[ 10-25 15:22:12.138 3871: 3936 D/ ]
HostConnection::get() New Host Connection established 0x7ffeeb7fe080, tid 3936
10-25 15:22:12.219 3871-3871/com.tpb.hn W/chromium: [WARNING:shell.cc(299)] Instance: exe:chrome attempting to register an instance for a process it created for target: exe:chrome_renderer without the mojo:shell{client_process} capability class.
10-25 15:22:12.317 3871-3871/com.tpb.hn W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 3871
10-25 15:22:12.317 3871-3871/com.tpb.hn D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
10-25 15:22:12.418 3871-3876/com.tpb.hn I/art: Do partial code cache collection, code=24KB, data=29KB
10-25 15:22:12.419 3871-3876/com.tpb.hn I/art: After code cache collection, code=24KB, data=29KB
10-25 15:22:12.419 3871-3876/com.tpb.hn I/art: Increasing code cache capacity to 128KB
10-25 15:22:12.635 3871-3871/com.tpb.hn I/HNLoader: onResponse: [I@842b545
10-25 15:22:12.635 3871-3871/com.tpb.hn I/ContentAdapter: IdLoadDone:
10-25 15:22:13.673 3871-3876/com.tpb.hn I/art: Do partial code cache collection, code=55KB, data=61KB
10-25 15:22:13.673 3871-3876/com.tpb.hn I/art: After code cache collection, code=55KB, data=61KB
10-25 15:22:13.673 3871-3876/com.tpb.hn I/art: Increasing code cache capacity to 256KB
10-25 15:22:13.765 3871-3871/com.tpb.hn W/art: Attempt to remove non-JNI local reference, dumping thread
10-25 15:22:13.766 3871-3911/com.tpb.hn E/OpenGLRenderer: GL error: GL_INVALID_VALUE
10-25 15:22:13.766 3871-3911/com.tpb.hn A/OpenGLRenderer: GL errors! frameworks/base/libs/hwui/BakedOpRenderer.cpp:66
--------- beginning of crash
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: Chrome build fingerprint:
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: 1.0
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: 1
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: f3e1957e-ea20-4058-8e10-b7e303fde16a
10-25 15:22:13.788 3871-3911/com.tpb.hn W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
10-25 15:22:13.788 3871-3911/com.tpb.hn A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3911 (RenderThread)
[ 10-25 15:22:13.788 1181: 1181 W/ ]
debuggerd: handling request: pid=3871 uid=10066 gid=10066 tid=3911
loadUrl 是 WebView 开始加载的时间
我看过有关 Fatal signal 6 code -6 的帖子,但没有人提供解决方案。
非常感谢任何帮助。
编辑 - 我删除了 WebView 的默认不可见性以及更改它的代码,并获得了更大的跟踪和更多细节。
我不能在这里发布它,因为帖子最终有 59000 个字符,但它现在在 PasteBin 上 Here
最佳答案
我遇到了类似的问题。就我而言,问题出在这段代码上:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
我删除了这行代码,我的应用程序不再崩溃。我在 Android N 上遇到过这个问题。顺便说一句 Hardware acceleration is enabled by default if your Target API level is >=14
我认为这行代码是多余的。
关于android - NestedScrollView 中的 WebView 给出致命信号 6 (SIGABRT) 代码 -6 RenderThread,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40242623/
我的代码在使用 malloc 时遇到问题。直到一个小时前它一直运行良好。它导致这一行 temp2 = (Temp*)malloc(sizeof(Temp));
我的应用程序运行完美,没有任何问题。但是当我尝试调试它时,android studio 卡住了。所以我收到消息“等待调试器”,然后该消息消失,接下来我在模拟器中只看到黑屏。 我也收到了消息 SIGNA
我用 node-js 和 fluent-ffmpeg 编写了一个 node-js api: 'use strict'; require('babel-register'); const path =
我只是在过去一直工作的模拟器上运行我的代码。我真正为启动代码所做的唯一一件事就是设置用户默认值 NSUserDefaults *defaults = [NSUserDefaults standard
我遇到应用程序每次运行时都会在模拟器上崩溃。由于某种原因,他们收到一个中止信号(见附件截图)。最近才开始用,不知道是不是和10.8.4升级有关。 我刚刚基于“单一 View 应用程序”模板创建了一个新
我的应用程序中存在一个错误,使我发疯!尝试隐藏navigationController工具栏后,主线程会收到SIGABRT消息。 [self.navigationController setToolb
我无法理解以下崩溃,因为它是随机发生的,并且我怀疑可能是多线程问题,但是这里是: Incident Identifier: 0BE956AB-228A-4B1B-8A3D-A99A481F7F3F C
我最近设置了 Crashlytics 以从我的 iOS 应用程序接收崩溃日志,并且我不断收到 SIGABRT 崩溃日志,但我找不到它的来源。 如果你能帮我一点,这是崩溃日志: Exception Ty
我正在尝试通过指针来理解这项工作。所以我编写了一个测试程序,其中通过删除分隔点将名称分成标签。每个标签都表示为长度/数据对,如下所示:google.ru 表示为“x\06googlex\02ru”当我
我正在研究教授给我们的一些旧课本,为即将到来的考试做准备,我遇到了这个问题。 我的任务是从结构如下的文本文件中读取信息: [十进制数字],[罗马数字(字符串)],[o 或 u(优化或未优化的罗马数字)
#toggle the string #include int main() { char S[100],ch; int i=0; gets(S); while((S[i]!
我正在开展一个学校项目,我需要从文件中获取矩阵的信息(高度、宽度、单元格状态)。像这样的事情: 30 40 /*height and width*/ 3 /*nr of lines
我学习 Swift 一段时间了,SIGABRT 信号随机出现了好几次。我尝试过一些在线教程,但似乎并不总是有效。 这次我试图用两个 View Controller 设置一个待办事项列表。一个有一个表格
我在我的项目中添加了第二个目标,以便能够对多个应用程序使用相同的 Xcode 项目(基本应用程序的风格略有变化)。我重命名了目标,更改了方案以匹配名称,还重命名了第二个 info.plist。现在,当
我试图运行一个简单的代码,它编译但当我尝试运行它时我得到(核心转储)错误。于是用gdb查看错误是什么。 代码: #include #include #include void gerar() {
我为这个问题苦苦挣扎了 2 天。我有一个解决方法,但我想了解更多会发生什么。让我们开始吧。我有一个非常原始的异常类,它保存一条错误消息作为指向字符数组的指针(我知道 std::string 的利润)。
NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];
我正在尝试从框架动态加载类,但应用程序因转换发送 SIGABRT 信号而崩溃: let newClassType = NSClassFromString("MyFramework.CustomClas
当我运行我的应用程序时, View Controller 中会调用一个函数,当发生这种情况时,我会收到信号 SIGABRT。 如何解决这个问题? 功能: func setRootViewControl
我正在尝试保存 UISwitch 结果并使用它们来填充 Parse.com 推送通知的“ channel ”。我遵循了解析指南,但每次我尝试单击保存开关值的保存按钮时,我都会收到一个 SIGABRT。
我是一名优秀的程序员,十分优秀!