Reputation: 533
I am building an application in Android Studio, which requires the use of date-picker. But when I am using date-picker in the layout file, I am getting the following rendering error:
Couldn't resolve resource @layout/date_picker_selected_date Failed to parse file C:\Users\Arnab PC\AppData\Local\Android\sdk\platforms\android-21\data\res\layout\date_picker_holo.xml
Upvotes: 1
Views: 4060
Reputation: 33
Same problem happend to me. This is an issued raised in API 21. You can try drop your API down to 19 and my problem disappeared.
See also here:Issue 151326:@code.google
Upvotes: 2
Reputation: 606
I had the same problem and temporarily solved it by this way: File → Invalidate caches / Restart... → Invalidate and Restart.
If it couldn't solve your problem. You should do other ways such as creating a button and a datepickerdialog will be shown after click on the button.
Upvotes: 3