我尝试在Eclipse ADT中实现textinputlayout(不在Android Studio中),我还包括库android-support-design.jar。
但我在渲染XML文件屏幕时出错:
错误是:
cast to android.view.ViewGroup
Exception details are logged in Window > Show View > Error Log
The following classes could not be instantiated:
- android.support.design.widget.TextInputLayout (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
答案 0 :(得分:3)
TextInputLayout
是设计支持库的一部分。import <android-sdk>/extras/android/support/design
。import
<android-sdk>/extras/android/support/v7/appcompat
。导入设计库后,您需要编辑project.proerties文件,如下所示:
# Project target.
target=android-21
android.library.reference.1=../v7/appcompat
android.library=true