这真的开始让我发疯.
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id+/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
Run Code Online (Sandbox Code Playgroud)
产生以下错误消息:" Error: no resource found that matches the given name (at 'id' with value '@id+/textview').
这是从Android hello world 示例中复制和粘贴的 .
这只是一个小错字; 你需要把'+'放在'@'之后,而不是'id'之后:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18826 次 |
| 最近记录: |