【发布时间】:2014-08-19 22:53:42
【问题描述】:
我对以下属性app:RectLayout和app:Roundlayout有问题,它在xml中给出错误,说有
Multiple annotations found at this line:
- error: No resource identifier found for attribute 'roundLayout' in package
'com.rarster.demowearman'
- error: No resource identifier found for attribute 'rectLayout' in package
'com.rarster.demowearman'',
然后在我的主要活动中也给出了一个错误,说 R 无法解析为变量,我正在关注本教程 https://medium.com/@tangtungai/how-to-develop-and-package-android-wear-app-using-eclipse-ef1b34126a5d。我检查了我的布局文件夹中是否有圆形布局和矩形布局。谁能告诉我发生了什么以及如何解决它?提前致谢
错误所在的代码是
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.view.WatchViewStub
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/watch_view_stub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:rectLayout="@layout/rect"
app:roundLayout="@layout/round"
tools:context="com.rarster.demowearman.MainActivity"
tools:deviceIds="wear" >
</android.support.wearable.view.WatchViewStub>
【问题讨论】: