- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我遇到了另一个关于 APK 扩展文件 (.obb-files) 的奇怪问题。我的扩展文件在我所有的测试设备上安装都很好:
我用 jobb-utilite 创建了加密的 .obb 文件:
jobb -o obb-filename -d files-dir -k password -pn applicationId> -pv versionCode
在我的应用程序中,我使用以下代码读取 .obb 文件:
public void initialize(final Context context) {
final StorageManager storageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
final File mainObbFile = getMainObbFile();
final OnObbStateChangeListener listener = new OnObbStateChangeListener() {
@Override
public void onObbStateChange(String path, int state) {
super.onObbStateChange(path, state);
if (state == OnObbStateChangeListener.MOUNTED) {
// work with obb file
} else {
throw new RuntimeException("OnObbStateChangeListener::onObbStateChange - can't mount .obb file (state = " + state + ").");
}
}
};
final String key = BuildConfig.MAIN_XAPK_KEY;
if (storageManager.isObbMounted(mainObbFile.getAbsolutePath())) {
// work with obb file
} else if (!storageManager.mountObb(mainObbFile.getAbsolutePath(), key, listener)) {
throw new RuntimeException("Can't create listener for mounting .obb file.");
}
}
一切正常。但是在魅族 m3 note (API 22) 上,我们得到了奇怪的错误:“OnObbStateChangeListener::onObbStateChange - can't mount .obb file (state = 21)”。
以前,我遇到过这个问题,并通过另一代 .obb 文件解决了。但在这种情况下,它没有帮助。此外,我尝试使用 fixed jobb 工具 ( https://github.com/monkey0506/jobbifier.git ) 生成 .obb 文件,但它不起作用。
可能有人知道,出了什么问题,为什么有时 .obb 文件在某些设备上不起作用?..
更新
另外,我检查了在魅族上安装非加密的 .obb 文件。有用。
提前致谢。
最佳答案
I had the same problem, and i figured out that many times Error 21 is caused by Linux Files Permissions over the obb, and the problem is that Android cannot have access to it so the StorageManager launches Error 21. When you create the .obb file, change permissions and user group to the file, something like:
$chmod 664 <obb-filename>.obb
$chown user:group <obb-filename>.obb
然后再试一次,对我有用。
关于android - 无法在魅族 m3 note 上挂载 .obb 文件(state = 21),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40224768/
我看过几个关于找到两个 OBB 之间的交点的线程。我仍然不明白如何找到最小穿透轴。我需要找到最小穿透轴,我相信它在 David Eberly 的论文中也被称为最后一个分离轴,以确定我应该使用表格的哪一
所以我遇到的问题非常简单,我似乎无法弄清楚。当我将扩展文件或 .obb 文件 main.2.com.example.project.obb 放入 obb 目录时,如下所示: /storage/emul
我正在尝试按照此处的指南在 Android 中测试扩展包文件 (OBB): http://developer.android.com/google/play/expansion-files.html
我正在为“扩展文件”开发 obb 集成。我通过复制设备 (4.1) 的 sdcard 上的 .obb 文件使其在本地工作,但在我的 4.2 设备上它不再工作了。 1) 在 4.1 平板电脑上:运行良好
我需要一些关于 obb 旋转的帮助: 首先,我检查 3d 模型的每个顶点并获取最小值和最大值以找到 obb 最小/最大点。 void obb::checkVertex(vector3f& vertex
嗨,我正在尝试使用 lwjgl 将 OBB 构建到我的 3d java 游戏中。目前我只是尝试使用matrix4f 旋转OBB 并通过渲染点来测试它。因此,当我渲染它时,它的 xyx=0,0,0 且
给定多条曲线,包括线段和圆弧,如何计算所有曲线的总OBB? 似乎各个曲线的每个 OBB 的并集都不对,这不是最小覆盖。 查看这张图,红框是怎么计算的? 最佳答案 您还应该以矢量形式添加输入,以便我们可
我正在创建一个 2D 游戏并想测试 OBB(定向边界框)和圆之间的碰撞。我不确定执行此操作的数学和代码。我正在用 C++ 和 OpenGL 创建游戏。 最佳答案 因为你的两个形状都是凸的,你可以使用
我在项目中使用文件扩展来访问 obb 文件夹中的音频、视频和图像文件。我的Obb文件的形式是:main.1.com.example.sample--->包含三个名为Images、Video和Audio
美好的一天! 假设我有一个名为 test 的目录。它包含几个目录和文件。(dir_1:file_1,file_2;dir_2:file_1,file_2;...;dir_5:file_1,file_2
我手动放置了 OBB 文件,这样我就可以检查是否一切正常。当我将文件放在 Android/obb 文件夹中时,在第一次构建时无法识别它。我注意到,如果我将 OBB 文件放入 obb 文件夹后重新启动手
给定形成 OBB 的中心点、宽度、高度和角度,如何确定给定点 P 是否在 OBB 内? 谢谢 最佳答案 我认为你的问题中的皱纹是边界框可以旋转?如果是这样,对我来说最简单的解决方案似乎是在以边界框中心
我正在关注所有官方扩展文件指南,但我找不到它。我无法访问我需要的包含的 obb 文件。 我需要 6 个音频文件 (80Mb),我将它们“存储”(未压缩)在一个 zip 文件中并重命名为“main.20
在我的应用程序中,我在 Android->obb->packagename->main.1.packagename.obb 下载了扩展文件。有人可以向我解释,即使有示例代码如何从中提取我的文件吗? 我
通过将 .obb 文件扩展到另一个目录以读取各个部分,我们已经在我们的应用程序中成功使用 APK 扩展文件技术一段时间了。我们最终决定尝试通过使用 StorageManager 挂载 bob 来直接读
我能够上传和下载可扩展文件在我的谷歌播放应用程序上。按照o[官方教程][1] 将obb文件保存到/Android/Obb/main.2.myappname.obb 我假设这个 obb 文件将被提取到
我正在尝试挂载一个 obb 文件,但是 std::fstream test("/storage/emulated/0/Android/obb/com.bixense.jngl_test/main.1.
我已经在我的游戏应用程序上开发了 obb 函数。简单解释一下obb函数的逻辑, 制作一个包含 Assets 的 zip 文件并重命名为 .obb。 使用 apk 将其上传到 Play 商店。然后它会自
我正在尝试编写一个刚体模拟器,在模拟过程中,我不仅对发现两个物体是否发生碰撞感兴趣,而且还对碰撞的点和法线感兴趣。我找到了很多资源,这些资源实际上说明了两个 OBB 是否正在使用分离轴定理发生碰撞。我
我在处理 APK 扩展时遇到问题。在 Java 端,我可以设置我应该设置的所有内容,但似乎我无法在 C++ 端正确修改代码。 CCFileUtilsAndroid::getFileData 函数内部:
我是一名优秀的程序员,十分优秀!