注意两点:
1.不要将android-support-v4包放在Android Private Libraries目录下。应将其放在lib目录中。
2.确认已将android-support-v4包添加到build path中。
3.配置好后重启eclipse。
如关联时提示如下信息:
The jar of this class file belongs to container 'Android Private Libraries' which does not allow modifications to source attachments on its entries.
需remove Android Private Libraries,如图: