Android Question Custom Theme not found error

phukol

Active Member
Licensed User
Longtime User
Hi guys, im doing a custom theme as based on the AppCompat tutorial. However i always the error
B4X:
AndroidManifest.xml:16: error: Error: No resource found that matches the given name (at 'theme' with value '@style/MyAppTheme').

my Manifest editor is :
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@style/MyAppTheme")

my theme.xml file is under resources ----> values folder having the code:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat">
        <item name="colorPrimary">#FF9800</item>
        <item name="colorPrimaryDark">#F57C00</item>
        <item name="colorAccent">#FFA726</item>
    </style>
</resources>

What am i doing wrong? I need to implement my custom theme
 

Pendrush

Well-Known Member
Licensed User
Longtime User
Change this line, from
B4X:
 <style name="MyAppTheme" parent="Theme.AppCompat">
to
B4X:
 <style name="MyAppTheme" parent="@android:style/Theme.AppCompat">
 
Upvote 0
Top