Android编译APK改变原始PNG文件 [英] Android build apk changes raw png files

查看:542
本文介绍了Android编译APK改变原始PNG文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,最近与一些设备后,我升级到SDK工具R16从SDK工具R11。

I had a problem recently with some devices after I upgraded to SDK Tools r16 from SDK Tools r11.

我发现这是质地有关,现在回过头来看的APK文件,我用SDK工具R11创建包含纹理的原始文件的精确副本。但随着SDK工具创建的APK文件,R16包含一定的差异在字节级,我看不出有什么区别,颜色深度或者没有差别,但发生在他们身上任何会导致问题,装上了​​PowerVR GPU的设备。

I found out it was texture related, now looking back the APK files I created with SDK Tools r11 contain exact copies of the textures in the raw file. But the APK files created with SDK Tools r16 contain some differences at the byte level, I can't see any difference, no difference in colour depth either, but whatever has happened to them causes problems loading on PowerVR GPU devices.

JPG和BMP文件都不会改变。

JPG and BMP files are not altered.

有谁知道什么可能导致这一点,我怎样才能得到一个原始文件留生?

Does anyone know what might be causing this and how I can get a raw file to stay raw?

编辑:看着里面的记事本文件++之我见iCCPPhotoshop ICC配置文件是从头部取出。可能有其他的变化。

Looking at the files inside Notepad++ I see "iCCPPhotoshop ICC profile" is removed from the header. There may be other changes.

EDIT2:望着在Windows资源管理器的属性的原始人说属性A和APK人说Attibutes N。这肯定剥离/变化的信息。

Looking at the properties in windows explorer the raw one says "Attributes A" and the APK one says "Attibutes N". It's definitely stripping/changing information.

EDIT3:我的意思是SDK工具修订XX不是API XX

I meant SDK Tools Revision XX not API XX

推荐答案

我不知道为什么会有人认为这是个好主意,但Android的做某种对PNG图像融为一体pression。请参见这里与它一个人的经验。我不知道,如果16 API做了来自API的11个不同的,但自从11至于如何解决这个问题的方法之前,这种行为一直都存在,我怀疑,重命名你的资源可能会有所帮助。尝试命名它whatever.mp3,而不是巴纽,看看能否解决。

I don't know why anyone thought this was a good idea but Android does some sort of compression on PNGs. See here for one guy's experience with it. I'm not sure if API 16 does something different from API 11, but this behavior has been there since way before 11. As to how to fix this behavior, I suspect that renaming your resource might help. Try naming it whatever.mp3 instead of .png and see if that fixes it.

这篇关于Android编译APK改变原始PNG文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆