如何创建OBB文件使用jobb工具的Andr​​oid [英] How to create OBB files USING jobb tool Android

查看:723
本文介绍了如何创建OBB文件使用jobb工具的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序已经成长为超过50MB,所以我现在需要使用扩展文件。在寻找我才知道,有一些可以作为扩展的文件,如ZIP,PDF格式等。我试图把我的数据.obb文件不同的文件,但我不知道如何创建这些文件,并把在这些文件中的数据。

更新
第一:

我发现 jobb 工具用于创建OBB文件。但我很困惑如何 $ jobb -d /温度/资产/ -o我-APP-assets.obb -k秘密密钥-pn com.my.app.package -pv 11 运行命令。
我试图运行此($ jobb -d /温度/资产/ -o我-APP-assets.obb -k秘密密钥-pn com.my.app.package -pv 11 在CMD但我CMD说jobb不承认内部或外部命令。

二: 哪种类型的文件,我可以把这些OBB文件?我想到的是布局,绘制的文件吗?

解决方案
  

我的CMD说jobb不承认内部或外部命令

添加/工具,而不是你的路径或 jobb 使用路径/要/ SDK /工具/ jobb.bat

  

被放在这些OBB文件,这些文件类型的文件

大的。像可绘,声音等。然后,例如,你可以使用这个code将绘制文件到ImageView的:

  imageView.setImageBitmap(
    BitmapFactory.de codeFILE(
        sm.getMountedObbPath(/路径/到/ OBB /文件)+
        路径/到/文件/中/ obb.png)
 

,或播放声音:

  mp.setDataSource(AcItem.this,
    Uri.fromFile(新文件(
        sm.getMountedObbPath(/路径/到/ OBB /文件)+
        路径/到/文件/中/ obb.png));
MP prepare()。
mp.start();
 

正如我说过的,GitHub的链接到我的OBB管理器类:<一href="https://github.com/uncleLem/AndroidUtils/blob/master/src/io/github/unclelem/androidutils/utils/ObbExpansionsManager.java" rel="nofollow">https://github.com/uncleLem/AndroidUtils/blob/master/src/io/github/unclelem/androidutils/utils/ObbExpansionsManager.java 我希望这会有所帮助。

My app has grown to be over 50mb, so I now need to use an expansion file. On searching I came to know that there are different files that can be used as expansion files such as zip, pdf etc. I am trying to put my data in .obb files but I don't know how to create these files and put the data in these files.

Updated
First:

I found out that jobb tool is used to create obb files. But I am confused how this $ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 command is run.
I tried to run this ($ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 on cmd but my cmd saying jobb is not recognise as internal or external command.

Second: Which type of files can I put in these obb files? I am thinking layouts, drawable files?

解决方案

my cmd saying jobb is not recognise as internal or external command

Add /tools to your path or instead of jobb use path/to/sdk/tools/jobb.bat

which type of files are put in these obb files

Big ones. Like drawables, sounds etc. Then, for example, you can use this code to put drawable file into ImageView:

imageView.setImageBitmap(
    BitmapFactory.decodeFile(
        sm.getMountedObbPath("/path/to/obb/file") + 
        "path/to/file/in/obb.png")

or, play sound:

mp.setDataSource(AcItem.this, 
    Uri.fromFile(new File(
        sm.getMountedObbPath("/path/to/obb/file") + 
        "path/to/file/in/obb.png"));
mp.prepare();
mp.start();

As I promised, GitHub link to my obb manager class: https://github.com/uncleLem/AndroidUtils/blob/master/src/io/github/unclelem/androidutils/utils/ObbExpansionsManager.java I hope it would help.

这篇关于如何创建OBB文件使用jobb工具的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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