As stated in style.xml, there is a weird error, which shows Cannot resolve symbol \'Theme\', which is quite strange.
See pic of the error :-
My Project Spe
Had the same issue after upgrading to Android Studio 3.1 (EDIT: bug still present at v3.1.3). What worked for me was clicking File > Close Project and then reopening the project from Studio's dialog.
Goto File -> Invalidate Caches / Restart... -> Invalidate and Restart
Android Studio will sort-of close and delete all caches, indexes, etc.. Then, Android Studio will open again. Indexing will be done and you're ready to proceed.
What worked for me was to click on Gradle to open the Gradle projects tool window and than on refresh. I think some depedencies where not loaded correctly.
Solution 1:
- GOTO > 'build.gradle(Module:app)',
- ADD > "buildToolsVersion '28.0.2'" as following :
android { signingConfigs {} compileSdkVersion 28 defaultConfig { applicationId "com.example.project" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } buildToolsVersion '28.0.1' }
- Click on 'Sync Now', and it's done.
- GOTO > 'File' > 'Invalidate Cache/Restart'.
- Done.
If That doesn't work, following might help (Solution 2) :
- GOTO > 'SDK Manager' > 'SDK Tools' > Click on 'Show Package Details',
- Check if there is a NEW Version of 'SDK Build-Tools' Available,
- Then Download it and Change to newer version "buildToolsVersion '28.0.x'" in 'build.gradle (Module:app)',
- Sync again.
- GOTO > 'File' > 'Invalidate Cache/Restart'.
- Done.
If That doesn't work, following might help (Solution 3) :
Remove/Cut following dependencies :
implementation 'com.android.support:appcompat-v7:x.x.x' implementation 'com.android.support:design:x.x.x'
Click on 'Sync Now',
- Add/Paste dependencies again and Sync again.
- Done.
NOTE : You can do Solution 1 then 2 then 3 for better results.
Hope it helped :)