更新到较新版本的Android Studio时出现Android构建错误

时间:2014-07-16 20:28:12

标签: android xml build gradle android-studio

我正在尝试构建一个大型的Android项目,我以前在0.8.1上的Android Studio 0.5.2上运行。虽然它在0.5.2上构建时没有错误,但在0.8.1上,Gradle构建失败并出现一些异常错误,包括:

 Error:(161) Error: The id "buttonMarkUnread" is not defined anywhere. [UnknownId]
                android:layout_alignBaseline="@+id/buttonMarkUnread"
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "UnknownId": 
The @+id/ syntax refers to an existing id, or creates a new one if it has
not already been defined elsewhere. However, this means that if you have a
typo in your reference, or if the referred view no longer exists, you do
not get a warning since the id will be created on demand. This check
catches errors where you have renamed an id without updating all of the
references to it.

Error: Suspicious method call; should probably call "layout" rather than "onLayout" [WrongCall]

奇怪的是,错误消息似乎有点像" linty&#34 ;;他们似乎更喜欢"陷阱"比实际的编译错误(也就是说,它们应该是警告)。是否有理由在较新版本的AS中出现编译错误,并且在纠正UnknownIdWrongCallDuplicateIds和{{1}时有一个简单的修复方法错误?

0 个答案:

没有答案