qq_39784616 2020-03-20 22:36 采纳率: 0%
浏览 715
已结题

startActivity导致APP闪退

正在尝试做一个虹软人脸识别接口的接入,从官方demo那里拿来了认证界面的
xml,但是从主活动切换到认证活动时出现了闪退请款,一路寻找确定了是
xml文件内容导致的闪退,但是多方搜索找不到相关内容,下面是xml代码

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextureView
            android:id="@+id/single_camera_texture_preview"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <com.arcsoft.arcfacedemo.widget.FaceRectView
            android:id="@+id/single_camera_face_rect_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </FrameLayout>

    <LinearLayout
        android:layout_margin="@dimen/common_bottom_margin"
        android:layout_gravity="bottom|end"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="register"
            android:text="@string/register" />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="switchCamera"
            android:text="@string/switch_camera" />
    </LinearLayout>

    <android.support.v7.widget.RecyclerView
        android:id="@+id/single_camera_recycler_view_person"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />


</FrameLayout>

在删掉了除最外层的FrameLayout在内的其他内容(内部的FrameLayout和LinearLayout以及android.support.v7.....)之后闪退问题消失

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-03-21 12:03
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现