Dominik Vávra
Dominik Vávra

Reputation: 121

Android studio cannot resolved symbol

I'm using Android studio and actually I'm styling Action bar.

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>

    </style>

    <style name="MyActionBar"
           parent="android:Theme.Holo.Light.DarkActionBar">
        <item name="android:background">@color/oranzova</item>
        <item name="android:icon">@drawable/ic_launcher.png</item>
    </style>


</resources>

I'm still getting error :

Error:(12, 35) No resource found that matches the given name (at 'android:icon' with value '@drawable/ic_launcher.png').

but no matters which resource I'm using. If i use @raw/icon.png i get still same error. I tried to Invalidate Caches/restart but no help.

Upvotes: 0

Views: 959

Answers (1)

reVerse
reVerse

Reputation: 35254

You don't need a file-extension like *.png on resource-files. So just change your line:

<item name="android:icon">@drawable/ic_launcher.png</item>

to

<item name="android:icon">@drawable/ic_launcher</item>

Upvotes: 1

Related Questions