CardView Design is not appear Xamarin Android

半腔热情 提交于 2021-01-29 15:45:59

问题


My CardView design is not properly appearing in Xamarin android project. It's gives me a alert "could not load controls form the android support library". Though I've added all support libraries. I really can't find the missing libraries now.

I've a imageview and some other textview under the CardView which is not appearing in design. but runs the project without having any issues.

Any help is highly appreciated.

[![Here is my design preview. It's just showing the text CardView][1]][1]

Here is the libraries


回答1:


I think your project may have migrated to AndroidX.

Try to install Xamarin.AndroidX.CardView nuget package and use

<androidx.cardview.widget.CardView>
    ...
</androidx.cardview.widget.CardView>

or install Xamarin.Google.Android.Material nuget package and use

<com.google.android.material.card.MaterialCardView>
    ...
</com.google.android.material.card.MaterialCardView>


来源:https://stackoverflow.com/questions/65300258/cardview-design-is-not-appear-xamarin-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!