苍山云 2022-04-07 22:56 采纳率: 0%
浏览 9

代码下载之后无法正常运行 加上部分代码后会报错

问题遇到的现象和发生背景

《X5WebView使用》在这篇文章中,我将代码下载了下来,但是加上几行代码后整个程序会报错,我想知道一下是不是版本问题

问题相关代码,请勿粘贴截图
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
 
    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="fill_parent"
        android:layout_height="5dp"
        android:indeterminateOnly="false"
        android:max="100"
        android:progressDrawable="@drawable/progress_bar_states" />
 
    <com.example.qd.webviewx5.X5WebView
        android:id="@+id/x5WebView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
 
</LinearLayout>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background">
        <shape>
            <corners android:radius="2dp" />
 
            <gradient
                android:angle="270"
                android:centerColor="#E3E3E3"
                android:endColor="#E6E6E6"
                android:startColor="#C8C8C8" />
        </shape>
    </item>
    <item android:id="@android:id/progress">
        <clip>
            <shape>
                <corners android:radius="2dp" />
 
                <gradient
                    android:centerColor="#FF1D9AFF"
                    android:endColor="#FF1D9AFF"
                    android:startColor="#FF1D9AFF" />
            </shape>
        </clip>
    </item>
</layer-list>

运行结果及报错内容

img

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

1条回答 默认 最新

  • 不会写代码的猴子 Android领域优质创作者 2022-04-08 09:48
    关注

    应该不是版本问题,可能是你创建文件的方式或者位置不对引起的
    你这个drawable放在什么位置呢?

    评论

报告相同问题?

问题事件

  • 创建了问题 4月7日

悬赏问题

  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题