为了账号安全,请及时绑定邮箱和手机立即绑定

MainActivty 未在牛轧糖和奥利奥上启动

MainActivty 未在牛轧糖和奥利奥上启动

慕盖茨4494581 2021-10-06 10:37:30
在 Android 9 设备(Lineage OS 16)中运行该应用程序时,它可以正常工作。但是当我尝试在 Nougat 或 Oreo 等设备上打开它时,它只显示空白活动。(注意:我在 Android 9(Lineage OS)中只有 1 或 2 秒的白色空白屏幕,但在 Nougat 和 Oreo 中它卡在空白的白色屏幕上)。我尝试在 Launcher Activity 和其他活动时启动其他活动,但 MainActivity 类应该启动到其他活动正常工作。我不知道错误是在布局设计中还是在 Java 类中(我认为错误可能不在 Java 类中,因为该应用程序可以在 Android 9 设备上完美运行!!)。这里我提供了xml布局和Java类。活动_main.xml<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout    android:id="@+id/drawer_layout"    android:layout_width="fill_parent"    android:layout_height="fill_parent"  xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto">    <RelativeLayout        android:layout_width="fill_parent"        android:layout_height="fill_parent">        <LinearLayout            android:id="@+id/ll_ads"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:layout_alignParentBottom="true"            android:orientation="horizontal" />        <RelativeLayout            android:id="@+id/track_info"            android:background="#ff0000"            android:visibility="gone"            android:layout_width="fill_parent"            android:layout_height="@dimen/track_info_layout_height"            android:layout_above="@+id/ll_ads">            <LinearLayout                android:background="@color/bottom_control_background"                android:layout_width="fill_parent"                android:layout_height="fill_parent">
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 136 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信