如何使用 jobb 工具创建 .obb 文件作为主 apk 扩展文件? [英] How to create .obb file as main apk expansion file using jobb tool?

查看:46
本文介绍了如何使用 jobb 工具创建 .obb 文件作为主 apk 扩展文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 80Mb 的 apk,因此无法将其上传到 Google Play 商店.我用谷歌搜索了很多,发现我必须创建 .obb 文件作为主要的扩展文件.

I have an apk of 80Mb and so am not able to upload it on google play store. I have googled a lot and found that I have to create .obb file as the main expansion file.

我还发现我可以使用 .obb 文件="nofollow noreferrer">jobb 工具,它在 sdk > 中工具 >jobb.bat 但不幸的是它在启动后立即关闭.

Also I have found that I can create a .obb file using the jobb tool which is inside sdk > tools > jobb.bat but unfortunately it closes just after it starts.

所以我错过了什么吗?

推荐答案

我用谷歌搜索,发现我们必须使用 0%(无压缩) 制作 .zip,这在 http://developer.android.com/google/play/expansion-files.html

i have googled and found that we shold have to make .zip with 0% (No compression) that is mention in http://developer.android.com/google/play/expansion-files.html

提示:如果您将媒体文件打包成 ZIP,您可以对带有偏移和长度控制(例如 MediaPlayer.setDataSource() 和 SoundPool.load())的文件使用媒体播放调用,而无需需要解压您的 ZIP.为使其工作,您不得在创建 ZIP 包时对媒体文件执行额外压缩.例如,在使用 zip 工具时,应使用 -n 选项指定不应压缩的文件后缀:zip -n .mp4;.ogg main_expansion media_files

OR 如何使用 winrar 制作 0% 压缩 zip?

这里看压缩方法

所以我们必须在 Play 商店上传这个 zip.

so we should have to upload this zip in play store.

所以你不需要使用 ZipHelper.java

只需简单地使用

ZipResourceFile expansionFile=null;

            try {
                expansionFile = APKExpansionSupport.getAPKExpansionZipFile(getApplicationContext(),3,0);

                     AssetFileDescriptor fd = expansionFile.getAssetFileDescriptor("test.mp4");
                     MediaPlayer mPlayer = new MediaPlayer();
                     mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
                     mPlayer.setDataSource(fd.getFileDescriptor(),fd.getStartOffset(),fd.getLength());
                     mPlayer.prepare();
                     mPlayer.start();

            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

这篇关于如何使用 jobb 工具创建 .obb 文件作为主 apk 扩展文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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