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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器