关于GooglePlay上传错误:android:icon attribute attribute is not a string value
2014-07-28 15:47
465 查看
关于GooglePlay上传错误:android:icon attribute attribute is not a string value
今天上传应用到GooglePlay提示错误如下:相信这个问题很多人都可能遇到过。遇到这种问题,首先本能的借助Google来找寻答案,果不其然还是有不少朋友遇到过这种问题。首先我反复的查看了下面这个帖子里面的内容,哈哈,问题竟然是aapt.ext工具可能存在有Bug,顿时三观尽毁啊!点击打开链接
问题找到了,该如何解决了?我试着升级Android SDK重新编译,很遗憾问题同样存在。接下来我开始从这个错误提示入手,‘android:icon attribute attribute is not a string value‘ 难道是程序Logo有问题?根据网上的各种资料,我将drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable-xhdpi以及默认drawable文件夹下面都存放了一份相应尺寸的应用图标。然而,上传后还是提示同样的错误~~~想来想去真的是没有什么好办法了~~
没办法现在只有不停的测试-上传来发现问题。但是上传一次GooglePlay太费时间,上面提示的错误不是由aapt.exe工具报告的吗?好家伙,找找其使用的指令直接用来测试编译好的APK应用,省事高效。操作方法:Windows环境下进入cmd,进入到你安装的SDK相应目录下面执行如下指令:
aapt dump badging Appname.apk
Appname.apk是你的APK文件全名,注意加后缀格式哦。如果能够顺利的通过则说明这个问题得到了解决,在控制台中会列出关于程序资源的详细信息;否则会提示相应错误信息如最开始所示。
再次回到错误提示中,灵机一动,上面不是有资源出错的位置索引:’0x7f080000'吗?我试着在资源文件R.java中搜索它,好家伙原来是程序的名称的String资源,根本与android:icon没有半毛钱关系~哈哈。下面是AndroidManifest.xml中关于应用的相关配置:
android:allowBackup="true" android:allowClearUserData="false" android:hardwareAccelerated="true" android:icon="@drawable/app_logo" android:label="@String/app_name" android:largeHeap="true"问题找到了就好办了,解决方法如下:
一:将应用名称进行硬编码写死,
android:label="your_app_name"二:原来我的程序的所有语言资源成了中文和英文,默认的value文件夹中没有相应的文件。添加一个默认的文件并包含app_name的字段就OK。
再次编译好新的APK用aapt解析一下,OK没有报错啦!看来开发者不可过度依赖某些工具的使用哦,如果工具本身就可能有问题那可是会浪费你不少宝贵时间来调试的!
相关文章推荐
- 关于getting 'android:label' attribute: attribute is not a string value 错误的解决方法
- aERROR getting 'android:icon' attribute: attribute is not a string value
- BUG Review:关于getting 'android:xxx' attribute: attribute is not a string value的问题及解决方法
- ERROR getting 'android:label' attribute: attribute is not a string value
- android打包时 ***is not translated in zh错误,引用的其他库比如V7 ,value中的string 全部报错
- Scala编程中常见错误:Error:(24, 29) value foreach is not a member of java.util.Set[String]
- 关于Tomcat: The value for the useBean class attribute is invalid 错误提示的解决方案
- 关于“The value for the useBean class attribute … is invalid”错误的解决
- 关于出现this class is not key value coding-compliant for the key的错误
- ic_luanch找不到和 label attribute is not a string value
- Android Studio编译错误:Attribute application@icon value=(@drawable/logo) from AndroidManifest.xml:26:9
- 关于"The value for the useBean class attribute is invalid" 错误<转>
- 关于 Android中googleMaps的Geocoder, “the service is not available”解决办法
- Android中 Your content must have a ListView whose id attribute is 'android.R.id.list'错误的解决办法
- Delphi - 关于错误E2002 File Type is not allowed here
- 关于android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an app
- 【转载】关于错误:ASP.NET The URL-encoded form data is not valid. .
- Android应用程序上传错误The package name of your apk may not begin with any of the following values:[com.android, com.google, android, co
- 关于出现Name jdbc is not bound in this Context错误的解决
- 关于错误:ASP.NET The URL-encoded form data is not valid.