Error:(46, 96) error: no suitable constructor found for Date(no arguments)Make sure you have imported java.util.Date in your java file:
constructor Date.Date(int,int,int) is not applicable
(actual and formal argument lists differ in length)
constructor Date.Date(long) is not applicable
(actual and formal argument lists differ in length)
import java.util.Date;If you import use auto import the necessary classes feature in Android Studio, sometimes it would suggest import java.sql.Date; make sure that's import java.util.Date.
import java.io.File;
import java.io.IOException;import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.Date;
Reference:
http://stackoverflow.com/questions/29884388/android-cannot-resolve-constructor-date/29886021
No comments :
Post a Comment