首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

proguard之后打开文件异常

2013-12-17 
proguard之后打开文件错误AssetManager localAssetManager nulllocalAssetManager getApplicationCont

proguard之后打开文件错误
AssetManager localAssetManager = null;
localAssetManager= getApplicationContext().getAssets();
localAssetFileDescriptor = localAssetManager.openFd("res/map3_style.txt.png");

以上这段代码在正常打包的情况下可以正常运行,但是通过proguard打包的情况下,运行的时候会报一个java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed


我反编译了一下,res目录里存在res/map3_style.txt.png这个文件,不知道为什么会报异常
[解决办法]
这个文件是不是过大了,改成.mp3的后缀试试

热点排行