I imported a working project from github and I find myself unable to run/rebuild project because of a problem with my styles.xml and build.grable.
Here are the links that I visited regarding this issue:
- Theme.AppCompat.Light.DarkActionBar - No resource found
- Android Errors : No resource found - Theme.AppCompat.Light.DarkActionBar, and Android Virtual Device
- No resource found that matches the given name 'Theme.AppCompat.Light'
- Fixing Error in styles.xml to generate R.java : No resource found name 'Theme.AppCompat.Light'
- No resource found - Theme.AppCompat.Light.DarkActionBar
- Can't Find Theme.AppCompat.Light for New Android ActionBar Support
And many more..Most solutions are old (5+ years) and the ones I tried did not work:
- Add compile 'com.android.support:appcompat-v7:25.3.1' in your build.gradle dependencies
- Import appcompat, the import button disappeared in the current version it seems
- Recompile/Resync/Invalidate cache/Close project/Reimport from github
- Adding library dependance in the module settings (I am asked to upload a file?)
Please be very explicit in your answers as to what to do (open X file, do Y) as I'm new with Android Studio.
Here are the main files:
Styles.xml:
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
Build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.app.game.quizee"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Thank you for your time!