As far as I can tell, if everything is fine with the code and menu resource files, the reason is not to add an additional style resource directory for the low-level API.
Here is my set:
AndroidManifest.xml File
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.levent.learning.notetaker"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
A) MainActivity.java
public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; } }
B) The resource file for the menu
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/hede" android:title="@string/hede_item"></item> </menu>
C) Resource File: styles.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppBaseTheme" parent="android:Theme.Light"> </style> <style name="AppTheme" parent="AppBaseTheme"> </style> </resources>
Everything seems perfect with these rights? But even so, the Options menu is not displayed. Thus, I created and added a resource directory for API level 11, named value-v11, and added an additional styles.xml file for it.
SOLUTION 1
D) Resource File for API Level 11
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> </style> </resources>
Then it will work!
Here is my working configuration, to make two different folders for the resource of values, I selected the Project option in Android;

SOLUTION 2
Remove the following line of the theme definition from the AndroidManifest.xml file;
android:theme="@style/AppTheme"
So, the new AndroidManifest.xml looks like this:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.levent.learning.notetaker"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
I am new to Android development using Android Studio version 2.1.2 . Even this question seems so old, it is not out of date. I hope this answer helps someone because this problem drives me crazy until I find an empirical solution, hope it helps. Happy coding!