问题表现
安装内置插件或者远程插件后,长按宿主里面的WebView里面的网页内容会发生崩溃。
如果没有安装任何插件,则不会发生崩溃。崩溃放生Android6.0以下版本的手机上。
复现步骤:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_navigation);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Log.e("ddddd","dsfsfsf");
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
((BottomNavigationView)findViewById(R.id.navigation)).setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
mActivityDelegate = new ActivityGroupDelegate(this,savedInstanceState);
mActivityGroupContainer = (ViewGroup) findViewById(R.id.content);
//switchToActivity("home","com.taobao.firstbundle.FirstBundleActivity");
showWebView();
}
private void showWebView(){
WebView view = new WebView(this);
view.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//
return false;
}
});
view.loadUrl("http://www.jianshu.com/p/74d4fc2a3673");
mActivityGroupContainer.addView(view);
}
* 运行Atlas待网页出现后,长按网页中文本,发生崩溃。网页不限,只要系统版本低于6.0的手机都会出现。
### bug分析:
* 将MainActivity的父类由AppCompactActivity修改为FragmentActivity不会出现该崩溃。
* 注释掉App/build.gradle文件中的 `autoStartBundles = ['com.taobao.firstbundle']` 该崩溃不会出现。
* 崩溃发生的前提是安装插件,无论内置插件和远程插件都会发生。
### bug输出如下:
```W/System.err(26685): android.view.InflateException: Binary XML file line #22: Error inflating class TextView
W/System.err(26685): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:770)
W/System.err(26685): at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
W/System.err(26685): at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
W/System.err(26685): at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
W/System.err(26685): at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
W/System.err(26685): at android.support.v7.widget.ActionBarContextView.initTitle(ActionBarContextView.java:135)
W/System.err(26685): at android.support.v7.widget.ActionBarContextView.setTitle(ActionBarContextView.java:116)
W/System.err(26685): at android.support.v7.view.StandaloneActionMode.setTitle(StandaloneActionMode.java:63)
W/System.err(26685): at android.support.v7.view.SupportActionModeWrapper.setTitle(SupportActionModeWrapper.java:67)
W/System.err(26685): at org.chromium.content.browser.SelectActionModeCallback.onCreateActionMode(SelectActionModeCallback.java:100)
W/System.err(26685): at com.android.internal.policy.impl.PhoneWindow$DecorView$ActionModeCallbackWrapper.onCreateActionMode(PhoneWindow.java:3522)
W/System.err(26685): at android.support.v7.view.SupportActionModeWrapper$CallbackWrapper.onCreateActionMode(SupportActionModeWrapper.java:160)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV9$ActionModeCallbackWrapperV9.onCreateActionMode(AppCompatDelegateImplV9.java:1791)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV9.startSupportActionModeFromWindow(AppCompatDelegateImplV9.java:829)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV9.startSupportActionMode(AppCompatDelegateImplV9.java:712)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV14$AppCompatWindowCallbackV14.startAsSupportActionMode(AppCompatDelegateImplV14.java:291)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV14$AppCompatWindowCallbackV14.onWindowStartingActionMode(AppCompatDelegateImplV14.java:274)
W/System.err(26685): at android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode(WindowCallbackWrapper.java:162)
W/System.err(26685): at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2981)
W/System.err(26685): at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2968)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:710)
W/System.err(26685): at android.view.View.startActionMode(View.java:5292)
W/System.err(26685): at org.chromium.content.browser.ContentViewCore.showSelectActionBar(ContentViewCore.java:2149)
W/System.err(26685): at org.chromium.content.browser.ContentViewCore.onSelectionEvent(ContentViewCore.java:2206)
W/System.err(26685): at org.chromium.android_webview.AwContents.nativeOnDraw(Native Method)
W/System.err(26685): at org.chromium.android_webview.AwContents.access$4300(AwContents.java:90)
W/System.err(26685): at org.chromium.android_webview.AwContents$AwViewMethodsImpl.onDraw(AwContents.java:2663)
W/System.err(26685): at org.chromium.android_webview.AwContents.onDraw(AwContents.java:1132)
W/System.err(26685): at com.android.webview.chromium.WebViewChromium.onDraw(WebViewChromium.java:1601)
W/System.err(26685): at android.webkit.WebView.onDraw(WebView.java:2406)
W/System.err(26685): at android.view.View.draw(View.java:16209)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15132)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
W/System.err(26685): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
W/System.err(26685): at android.view.View.updateDisplayListIfDirty(View.java:15092)
W/System.err(26685): at android.view.View.getDisplayList(View.java:15155)
W/System.err(26685): at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:275)
W/System.err(26685): at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:281)
W/System.err(26685): at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:320)
W/System.err(26685): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2779)
W/System.err(26685): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2611)
W/System.err(26685): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2201)
W/System.err(26685): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1216)
W/System.err(26685): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6678)
W/System.err(26685): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
W/System.err(26685): at android.view.Choreographer.doCallbacks(Choreographer.java:590)
W/System.err(26685): at android.view.Choreographer.doFrame(Choreographer.java:560)
W/System.err(26685): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
W/System.err(26685): at android.os.Handler.handleCallback(Handler.java:739)
W/System.err(26685): at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err(26685): at android.os.Looper.loop(Looper.java:145)
W/System.err(26685): at android.app.ActivityThread.main(ActivityThread.java:5981)
W/System.err(26685): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(26685): at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err(26685): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
W/System.err(26685): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
W/System.err(26685): Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 6
W/System.err(26685): at android.content.res.TypedArray.twGetColorStateList(TypedArray.java:438)
W/System.err(26685): at android.content.res.TypedArray.getColorStateList(TypedArray.java:420)
W/System.err(26685): at android.widget.TextView.<init>(TextView.java:1100)
W/System.err(26685): at android.widget.TextView.<init>(TextView.java:997)
W/System.err(26685): at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:62)
W/System.err(26685): at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:58)
W/System.err(26685): at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
W/System.err(26685): at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
W/System.err(26685): at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
W/System.err(26685): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:732)
W/System.err(26685): ... 95 more
I/DEBUG (16514): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (16514): Build fingerprint: 'samsung/trlteduosctc/trltechn:5.0.1/LRX22C/N9109WKEU1BOJ4:user/release-keys'
I/DEBUG (16514): Revision: '12'
I/DEBUG (16514): ABI: 'arm'
I/DEBUG (16514): pid: 26685, tid: 26685, name: com.taobao.demo >>> com.taobao.demo <<<
I/DEBUG (16514): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG (16514): Abort message: '[FATAL:jni_android.cc(295)] Check failed: false. Please include Java exception stack in crash report
I/DEBUG (16514): '
I/DEBUG (16514): r0 00000000 r1 0000683d r2 00000006 r3 00000000
I/DEBUG (16514): r4 b6f66114 r5 00000006 r6 0000000b r7 0000010c
I/DEBUG (16514): r8 b6f45e04 r9 bec048f8 sl 00000000 fp bec048bc
I/DEBUG (16514): ip 0000683d sp bec043d0 lr b6eeffd1 pc b6f14018 cpsr 600f0010
I/DEBUG (16514):
I/DEBUG (16514): backtrace:
I/DEBUG (16514): #00 pc 00038018 /system/lib/libc.so (tgkill+12)
I/DEBUG (16514): #01 pc 00013fcd /system/lib/libc.so (pthread_kill+52)
I/DEBUG (16514): #02 pc 00014beb /system/lib/libc.so (raise+10)
I/DEBUG (16514): #03 pc 00011531 /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG (16514): #04 pc 0000fcbc /system/lib/libc.so (abort+4)
I/DEBUG (16514): #05 pc 002b4775 /system/app/WebViewGoogle/lib/arm/libwebviewchromium.so
I/DEBUG (16514):
2条答案
按热度按时间mnemlml81#
正在看
2nbm6dog2#
我找到一个初步解决方案,将Atlas的引用的版本恢复到上个release就不会出现这个bug了。
不出现崩溃的版本为:
出现崩溃的版本为: