旋转 ZoomControls,但“在包‘android’中找不到属性的资源标识符”
我正在寻找旋转 ZoomControls 小部件。 API 文档说它继承了 android.view.View 的 'android:rotation' 属性,但 Eclipse 抛出一个错误,指出当我添加它时它找不到资源标识符。我在这里缺少什么?
I'm looking to rotate the ZoomControls widget. The API docs says that it inherits the 'android:rotation' attribute from android.view.View, yet Eclipse throws an error stating that it can't find the resource identifier when I add it in. What am I missing here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这篇文章有点旧,但万一其他人也遇到同样的问题,这里...
这个问题很可能(正如@bigstones 所暗示的)由于 android:rotation 调用 setRotation。从链接中可以看出,这实际上是在 API 级别 11 中添加的。创建新项目时,Android API 默认设置为 API 8。
解决方案:只需转到项目属性并将 API 级别更改为以上或以上的任何级别等于11.
干杯
I am aware that this post is slightly old, but in case other people are having the same problem here goes...
The problem was most likely (as hinted by @bigstones) due to the fact that android:rotation calls the setRotation. As can be seen in the link, this was actually added in API level 11. When creating a new project Android API is set by default to API 8.
Solution: Just go to your project properties and change the API level to be anything above or equal to 11.
cheers