【发布时间】:2020-07-01 10:37:49
【问题描述】:
我遇到了一个问题,我设置了我创建的 activity.xml 的内容视图,但它显示了一些错误。请帮帮我,我还在学习。
这是创建活动时的图像
这是显示错误的图像
这是xml文件 activity_daily_expense_fragment_handler.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".daily_expense_fragment_handler">
</androidx.constraintlayout.widget.ConstraintLayout>
【问题讨论】:
-
请检查您导入的 R.
-
嗨。请勿分享屏幕截图,但请提供错误消息
-
你能把import R的图片发过来吗?你用android.R导入了吗?如果是,则使用您的包名导入
-
谢谢我没有导入 R 我现在输入谢谢大家
-
如果它有效,那么您能接受我的回答吗?
标签: android android-studio android-activity setcontentview