第一次使用Xamarin。
我无法在内容选项卡中打开 Main.axml 以修改应用程序 View 。
我只能在源标签中显示它。
错误消息是“无法加载布局:操作因内部错误而失败:com.android.ide.common.rendering.api.SessionParams.(Lcom/android...
有谁知道如何修复它。
谢谢大家的帮助,
最佳答案
认为格式略有偏差,试试这个:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/myButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
改变步骤:
- 去掉
xmlns:android="schemas.android.com/apk/res/android"
末尾的分号
- 将
xmlns:android="schemas.android.com/apk/res/android"
更改为xmlns:android="http://schemas.android.com/apk/res/android"
- 认为删除“http://”可能只是 StackOverflow 评论的格式 - 最后将
layout_width
和layout_height
中的"fill_parent"
更改为"match_parent"
区别here
关于android - 无法在 Xamarin Studio 中加载 Main.axml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30954849/