qq_52008128 2021-06-29 17:25 采纳率: 0%
浏览 50

Android resource linking failed

 有没有好家人能帮我看看这个问题啊,搜了好多都搜不到,qaqaqaq

 <Button
            android:id="@+id/btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="100dp"
            android:layout_margintop="450dp"
            android:text="enter" />

上面是出现错误提示的地方,但是我实在不知道哪错了。。。。

整个xml为

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:id="@+id/main_activity"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.finalwork.MainActivity"
    android:orientation="horizontal">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="fitXY"
        android:src="@mipmap/background1" />


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:orientation="horizontal">

        <Spinner
            android:id="@+id/spinner_choice"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:entries="@array/choice" />
    </LinearLayout>

    <TextView

        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ems="1"
        android:layout_gravity="center"
        android:text="记录生活 记录成长"

        android:textColor="@color/white"
        android:textSize="40sp" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="650dp"
        android:layout_marginLeft="45dp">
        <Button
            android:id="@+id/btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="100dp"
            android:layout_margintop="450dp"
            android:text="enter" />

    </LinearLayout>


</FrameLayout>
  • 写回答

1条回答 默认 最新

  • 帅次 移动开发领域优质创作者 2021-06-29 18:05
    关注

    资源链接未生效

    检查@mipmap/background1、@array/choice、@color/white是否有不存在或者未生效。如有缺失补充即可。

    没有确实,就Android Studio -->Build-->Clean Project再次运行试试

    如有帮助。麻烦采纳

    评论

报告相同问题?

悬赏问题

  • ¥15 c++ gmssl sm2验签demo
  • ¥15 关于模的完全剩余系(关键词-数学方法)
  • ¥15 有没有人懂这个博图程序怎么写,还要跟SFB连接,真的不会,求帮助
  • ¥30 模拟电路 logisim
  • ¥15 PVE8.2.7无法成功使用a5000的vGPU,什么原因
  • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
  • ¥15 安装quartus II18.1时弹出此error,怎么解决?
  • ¥15 keil官网下载psn序列号在哪
  • ¥15 想用adb命令做一个通话软件,播放录音
  • ¥30 Pytorch深度学习服务器跑不通问题解决?