【发布时间】:2015-03-31 14:29:30
【问题描述】:
我正在编写一个 android 应用程序,但从一开始图标就没有出现在操作栏上。我已经阅读/应用了许多可能的解决方案,但没有出现。你能帮帮我吗?
Manifest.xml:
(...)
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
(...)
styles.xml:
(...)
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:icon">@drawable/ic_launcher</item>
</style>
我正在使用以下配置:
defaultConfig {
applicationId "com.converter.android.converter"
minSdkVersion 11
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
【问题讨论】:
-
“我已经阅读/应用了很多可能的解决方案,但它没有出现”——如果你不解释,你将作为things like this的副本被关闭完全准确你尝试了什么。
-
@CommonsWare,我尝试在 style.xml 中更改 parent="Theme.AppCompat.Light.DarkActionBar"。还尝试了 ActionBar actionBar = getActionBar(); actionBar.setIcon(R.drawable.ic_launcher) 但这仅适用于 API 14。
-
我认为这与我使用的主题有关..
标签: android