当我长按Webview(android)中的文本时,应用程序崩溃了。我也无法选择文字,因为它会在文字突出显示之前崩溃。通常,应用程序会显示默认的上下文操作栏,但应用程序崩溃。
在我的活动OnCreate中,我使用了" setWebViewClient"和" LoadURL"。
webview位于RelativeLayout(main)内,位于另一个RelativeLayout;
之下这是日志:
09-15 23:35:21.680 26033-26033 / com.edireito.digimecum.dgpro W / ActivityThread:应用程序com.edireito.digimecum.dgpro正在等待 对于端口8100上的调试器......
09-15 23:35:21.681 26033-26033 / com.edireito.digimecum.dgpro I / System.out:发送WAIT块
09-15 23:35:21.771 26033-26043 / com.edireito.digimecum.dgpro我/艺术: 调试器处于活动状态
09-15 23:35:21.910 26033-26033 / com.edireito.digimecum.dgpro I / System.out:调试器已连接
09-15 23:35:21.910 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:22.111 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:22.312 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:22.512 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:22.714 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:22.915 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:23.116 26033-26033 / com.edireito.digimecum.dgpro I / System.out:等待调试器解决...
09-15 23:35:23.318 26033-26033 / com.edireito.digimecum.dgpro I / System.out:调试器已经解决(1383)
09-15 23:35:23.868 26033-26033 / com.edireito.digimecum.dgpro I / LibraryLoader:预期的本机库版本号"",实际 本机库版本号""
09-15 23:35:23.869 26033-26033 / com.edireito.digimecum.dgpro I / chromium:[INFO:library_loader_hooks.cc(116)] Chromium logging enabled:level = 0,默认verbosity = 0
09-15 23:35:23.952 26033-26033 / com.edireito.digimecum.dgpro I / BrowserStartupController:初始化chrome进程,renderers = 0
09-15 23:35:23.958 26033-26033 / com.edireito.digimecum.dgpro W / art: 尝试从IRT中删除本地SIRT条目,忽略
09-15 23:35:23.991 26033-26033 / com.edireito.digimecum.dgpro E / AudioManagerAndroid:缺少BLUETOOTH权限!
09-15 23:35:24.057 26033-26033 / com.edireito.digimecum.dgpro I / Adreno-EGL :: EGL 1.4 QUALCOMM构建: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.018_msm8226_LNX.LA.3.5.1_RB1__release_AU ()OpenGL ES着色器编译器版本:E031.24.00.08构建日期: 03/07/14 Fri Local Branch:Remote Branch:quic / LNX.LA.3.5.1_RB1.1 本地补丁:无重建分支: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.018 + f2fd134 + NOTHING
09-15 23:35:24.104 26033-26228 / com.edireito.digimecum.dgpro W / art: 螺纹[16,TID = 26228,母语,螺纹* = 0x48f0c758,同行= 0x6526f030,"螺纹-40584"] 在没有提供名字的情况下附上
09-15 23:35:24.127 26033-26223 / com.edireito.digimecum.dgpro W / art: 螺纹[17,TID = 26223,母语,螺纹* = 0x48ce1740,同行= 0x6526ff90,"螺纹-40585"] 在没有提供名字的情况下附上
09-15 23:35:24.202 26033-26228 / com.edireito.digimecum.dgpro W / chromium:[警告:proxy_service.cc(890)]禁用PAC支持 因为没有系统实现
09-15 23:35:24.250 26033-26033 / com.edireito.digimecum.dgpro W / art: 尝试从IRT中删除本地SIRT条目,忽略
09-15 23:35:24.340 26033-26033 / com.edireito.digimecum.dgpro W / art: 尝试从IRT中删除本地SIRT条目,忽略
09-15 23:35:24.406 26033-26033 / com.edireito.digimecum.dgpro W / art: 尝试从IRT中删除本地SIRT条目,忽略
09-15 23:35:25.074 26033-26277 / com.edireito.digimecum.dgpro W / art: 螺纹[19,TID = 26277,母语,螺纹* = 0x48ed9778,同行= 0x652b6480,"螺纹-40588"] 在没有提供名字的情况下附上
09-15 23:35:25.223 26033-26033 / com.edireito.digimecum.dgpro D / AudioManagerAndroid:==> onReceive:s = 0,m = 0,n = h2w,sb = true
09-15 23:35:25.226 26033-26033 / com.edireito.digimecum.dgpro D / AudioManagerAndroid:reportUpdate:state = 0,devices = [Speakerphone, 耳机耳机]
09-15 23:35:26.116 26033-26033 / com.edireito.digimecum.dgpro D / OpenGLRenderer:启用调试模式0
09-15 23:35:26.291 26033-26033 / com.edireito.digimecum.dgpro I / Choreographer:跳过52帧!该应用程序可能也在做 在其主线上做了很多工作。
09-15 23:35:26.325 26033-26033 / com.edireito.digimecum.dgpro W / AwContents:nativeOnDraw失败;清除背景颜色。
09-15 23:35:27.031 26033-26033 / com.edireito.digimecum.dgpro W / AwContents:nativeOnDraw失败;清除背景颜色。
09-15 23:35:27.143 26033-26312 / com.edireito.digimecum.dgpro W / art: 螺纹[22,TID = 26312,母语,螺纹* = 0x48f02c50,同行= 0x652d35f8,"螺纹-40591"] 在没有提供名字的情况下附上
09-15 23:35:36.842 26033-26033 / com.edireito.digimecum.dgpro W / System.err:java.lang.NullPointerException:尝试调用 虚方法' android.content.Context android.app.ActionBar.getThemedContext()'在空对象引用上
09-15 23:35:36.852 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.support.v7.app.ActionBarImplICS.getThemedContext(ActionBarImplICS.java:302)
09-15 23:35:36.855 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.support.v7.app.ActionBarImplJB.getThemedContext(ActionBarImplJB.java:20)
09-15 23:35:36.859 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.support.v7.app.ActionBarActivityDelegate.getActionBarThemedContext(ActionBarActivityDelegate.java:210)
09-15 23:35:36.863 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.support.v7.app.ActionBarActivityDelegateICS.onActionModeStarted(ActionBarActivityDelegateICS.java:195)
09-15 23:35:36.868 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.support.v7.app.ActionBarActivityDelegateICS $ WindowCallbackWrapper.onActionModeStarted(ActionBarActivityDelegateICS.java:359)
09-15 23:35:36.872 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.internal.policy.impl.PhoneWindow $ DecorView.startActionMode(PhoneWindow.java:2437)
09-15 23:35:36.876 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.internal.policy.impl.PhoneWindow $ DecorView.startActionModeForChild(PhoneWindow.java:2362)
09-15 23:35:36.879 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
09-15 23:35:36.883 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
09-15 23:35:36.886 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
09-15 23:35:36.890 26033-26033 / com.edireito.digimecum.dgpro W / System.err:在android.view.View.startActionMode(View.java:4554)
09-15 23:35:36.894 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.content.browser.ContentViewCore.showSelectActionBar(ContentViewCore.java:2341)
09-15 23:35:36.898 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.content.browser.ContentViewCore.access $ 2200(ContentViewCore.java:93)
09-15 23:35:36.902 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.content.browser.ContentViewCore $ 13.showHandles(ContentViewCore.java:2154)
09-15 23:35:36.906 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.content.browser.input.SelectionHandleController.onSelectionChanged(SelectionHandleController.java:168)
09-15 23:35:36.910 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.content.browser.ContentViewCore.onSelectionBoundsChanged(ContentViewCore.java:2620)
09-15 23:35:36.914 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(母语 方法)
09-15 23:35:36.918 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24)
09-15 23:35:36.921 26033-26033 / com.edireito.digimecum.dgpro W / System.err:在android.os.Handler.dispatchMessage(Handler.java:102)
09-15 23:35:36.925 26033-26033 / com.edireito.digimecum.dgpro W / System.err:在android.os.Looper.loop(Looper.java:136)
09-15 23:35:36.928 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at android.app.ActivityThread.main(ActivityThread.java:5088)
09-15 23:35:36.931 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at java.lang.reflect.Method.invoke(Native Method)
09-15 23:35:36.935 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:785)
09-15 23:35:36.938 26033-26033 / com.edireito.digimecum.dgpro W / System.err:at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
09-15 23:35:37.040 26033-26033 / com.edireito.digimecum.dgpro A / libc: 致命信号6(SIGABRT)位于0x000065b1(代码= -6),线程26033 (digimecum.dgpro)
答案 0 :(得分:1)
在分析代码之后,我发现问题出现在Java文件的开头。它始于
package com.edireito.dgpro.dgpro;
import...
public class MyActivity extends ActionBarActivity {
当我改变" ActionBarActivity"到"活动",它有效!
感谢。