If I have not filed my 2017 taxes, is it possible for me to use my 2017 AGI for my 2018 online filing? Or do I need to mail them both in?

I missed the date for filing 2017. I also need to file 2018.


My tax return says my AGI, but when I e-file, it gets rejected.


Do I need to mail them both in?