1、新的或是修改的资源文件问题

Cannot parse result path string:

检查项目新建的资源是不是有直接应用的而不是声明后引用的。

例如:颜色要在colors里面声明  然后在drawable里面引用使用不要直接在drawable文件里面使用。

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:width="40dp"
        android:height="40dp" />
    <solid android:color="#00ff00" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:width="40dp"
        android:height="40dp" />
    <solid android:color="@color/color_red" />
</shape>

2、更新gradle试试,用最新的gradle

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐