I got it fixed by Going to build.gradle
file and in dependencies the appcompat
one, something like compile 'com.android.support:appcompat-v7:XX.X.X'
Changed it to compile 'com.android.support:appcompat-v7:XX.X.+'
Then click on Sync. All the red squiggly lines should go if everything else in your code is correct.