Xamarin Android中axml中的元素顺序导致编译错误

时间:2018-08-14 13:20:56

标签: android xamarin xamarin.android

我在声明该项目之前已经引用该项目的axml中遇到编译错误。

据我所知,Android没有任何此类限制。此外,如果我在Android Studio中复制粘贴相同的布局,则效果很好。

有人在Xamarin.Android中知道此问题的解决方法

错误是:

@media (max-width: 480px) {
    h3.uppertext {
        color: #ff0000 !important;
        font-size: 18px !important;
        text-align:center;
    }

    .textwidget h4 {

        font-size:18px !important;
        line-height:24px !important;
    }
}

以下是生成错误的简化版式:

error APT0000: No resource found that matches the given name (at 'layout_below' with value '@id/textView1').

1 个答案:

答案 0 :(得分:2)

第一次使用时,您需要在ID前面添加一个+。因此,在这种情况下,它应类似于:

android:layout_below="@+id/textView1"

这是一个类似的问题: No resource found that matches the given name

相关问题