[英]ERROR getting 'android:icon' attribute: attribute is not a string value while uploading apk to playstore
I've receive that message : 我已经收到该消息:
My AndroidManifest : 我的AndroidManifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="..."
android:versionCode="1"
android:versionName="1.0" >
<uses-feature
android:glEsVersion="0x00020000"
android:required="true">
</uses-feature>
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21" />
<uses-feature android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="..."
android:allowBackup="true"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:icon="@drawable/launcher"
android:largeHeap="true"
android:theme="@style/AppTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="..."
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="..."
android:label="@string/label_add_new_object"
android:screenOrientation="portrait"
android:icon="@drawable/ic_arrow"
android:theme="@style/MyFancyTheme"
android:configChanges="orientation|screenSize">
</activity>
<activity
android:name="..."
android:label="@string/label_settings_activity"
android:screenOrientation="portrait"
android:icon="@drawable/ic_arrow"
android:theme="@style/Theme.AppCompat.Light"
>
</activity>
<activity
android:name="..."
android:screenOrientation="portrait"
android:label="@string/app_name"
android:icon="@android:color/transparent"
android:theme="@style/CustomActionBarStyle">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
</application>
As I've read here , here and here , I've done : 1) copied all the drawables from @android/drawable to my corresponding folders hdpi, mdpi, etc - so I havn't any icon from @android/drawable folder in the project 2) put the icon drawable to the drawable folder of the res 3) cleaned the project 正如我在这里 , 这里和这里所读的,我已经完成了:1)将所有可绘制对象从@ android / drawable复制到我的相应文件夹hdpi,mdpi等-所以我没有@ android / drawable文件夹中的任何图标在项目中2)将图标drawable放入res的drawable文件夹中3)清理项目
What can be solution for this ? 有什么解决方案?
I think it is linked to having the icon attribute setting to a color @android:color/transparent. 我认为这与将图标属性设置设置为颜色@android:color / transparent有关。 Maybe try a transparent drawable rather than a color.
也许尝试使用透明的可绘制对象而不是颜色。
I've found the solution - it was in 我找到了解决方案-它在
<activity
....
android:icon="@android:color/transparent" - the problem string
...
</activity>
when I removed that string, everythins worked fine 当我删除该字符串时,一切都工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.