开发类QQ软件时,activity之间跳转会闪退

KiloKing 2017-11-29 10:18:46

错误代码时这样的
...全文
221 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_35783360 2017-12-05
  • 打赏
  • 举报
回复
我是toolbar设置了noactionbar,不过如果没有设置这个,3.0的android studio是默认带了 一个toolbar的,还有openDrawer是去哪里看,是不是按住ctrl键点drawerLayout
头发还没秃a 2017-12-04
  • 打赏
  • 举报
回复
使用ToolBar的时候 Style 是不是设置的 NoActionBar ?DrawerLayout 打开位置 openDrawer 有没设置错误或者对应上
KiloKing 2017-12-04
  • 打赏
  • 举报
回复
我是toolbar设置了noactionbar,不过如果没有设置这个,3.0的android studio是默认带了 一个toolbar的,还有openDrawer是去哪里看,是不是按住ctrl键点drawerLayout
Perfect411_111 2017-12-03
  • 打赏
  • 举报
回复
从源码中看是没找到类,你看下你引用的第三方的或者源码的库有没有,比如那个DrawerLayout,这个有没有引用v4包,xml中不会检测报错的
Perfect411_111 2017-12-03
  • 打赏
  • 举报
回复
/** * Creates a view from a tag name using the supplied attribute set. * <p> * <strong>Note:</strong> Default visibility so the BridgeInflater can * override it. * * @param parent the parent view, used to inflate layout params * @param name the name of the XML tag used to define the view * @param context the inflation context for the view, typically the * {@code parent} or base layout inflater context * @param attrs the attribute set for the XML tag used to define the view * @param ignoreThemeAttr {@code true} to ignore the {@code android:theme} * attribute (if set) for the view being inflated, * {@code false} otherwise */ View createViewFromTag(View parent, String name, Context context, AttributeSet attrs, boolean ignoreThemeAttr) { if (name.equals("view")) { name = attrs.getAttributeValue(null, "class"); } // Apply a theme wrapper, if allowed and one is specified. if (!ignoreThemeAttr) { final TypedArray ta = context.obtainStyledAttributes(attrs, ATTRS_THEME); final int themeResId = ta.getResourceId(0, 0); if (themeResId != 0) { context = new ContextThemeWrapper(context, themeResId); } ta.recycle(); } if (name.equals(TAG_1995)) { // Let's party like it's 1995! return new BlinkLayout(context, attrs); } try { View view; if (mFactory2 != null) { view = mFactory2.onCreateView(parent, name, context, attrs); } else if (mFactory != null) { view = mFactory.onCreateView(name, context, attrs); } else { view = null; } if (view == null && mPrivateFactory != null) { view = mPrivateFactory.onCreateView(parent, name, context, attrs); } if (view == null) { final Object lastContext = mConstructorArgs[0]; mConstructorArgs[0] = context; try { if (-1 == name.indexOf('.')) { view = onCreateView(parent, name, attrs); } else { view = createView(name, null, attrs); } } finally { mConstructorArgs[0] = lastContext; } } return view; } catch (InflateException e) { throw e; } catch (ClassNotFoundException e) { final InflateException ie = new InflateException(attrs.getPositionDescription() + ": Error inflating class " + name, e); ie.setStackTrace(EMPTY_STACK_TRACE); throw ie; } catch (Exception e) { final InflateException ie = new InflateException(attrs.getPositionDescription() + ": Error inflating class " + name, e); ie.setStackTrace(EMPTY_STACK_TRACE); throw ie; } }
KiloKing 2017-12-03
  • 打赏
  • 举报
回复

gradle里的是这样的,改的我都脑壳疼了
雨焰 2017-11-30
  • 打赏
  • 举报
回复
看你的报错是你的布局文件的问题
KiloKing 2017-11-30
  • 打赏
  • 举报
回复
我的布局文件也没有报错啊,是不是因为android ID里取了一些软件识别不了的名字
KiloKing 2017-11-29
  • 打赏
  • 举报
回复

两个activity的代码

跳转到的activity对应的layout代码

80,337

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧