[Solved] error: resource style/AppTheme (aka com.example.myapplication:style/AppTheme

Solution: accidentally delete the content in APP/SRC/main/RES/values/styles.xml and add one:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
	<!-- Customize your theme here. -->
	<item name="colorPrimary">#A000</item>   <!-- Set the color of the top header -->
	<item name="colorPrimaryDark">#8000</item> <! -- Set the background color above the title -->
	<item name="colorAccent">#00f</item> <! -- response color for input box and button radio box -->

By the way, add the contents of colors.xml and strings.xml.


    <string name="app_name">My Application</string>


<?xml version="1.0" encoding="utf-8"?>
    <color name="purple_200">#FFBB86FC</color>
    <color name="purple_500">#FF6200EE</color>
    <color name="purple_700">#FF3700B3</color>
    <color name="teal_200">#FF03DAC5</color>
    <color name="teal_700">#FF018786</color>
    <color name="black">#FF000000</color>
    <color name="white">#FFFFFFFF</color>

Similar Posts: