关于cocos creator2.42打包问题

1.遇到一个打包问题,资源都在Resource下2G大小,构建之后,提示成功,构建完成后,编译失败,用android studio去组包,也报失败,错误是一样的,都出现过几次不一样的错误,不过只要把资源删除大部分,就一定能打出来。
官方的大佬们,是否知道什么原因?

2.我现在把包拆成Remote了,这样就有两个选择:
首先把remote资源放在了HTTP资源服务器上(MapBundle)
方案一:cc.assetManager.loadBundle(“http://192.168.6.149:8090/remote/MapBundle”… ,这样的方式直接访问,是否可行?,在打包的时候没有填写远程资源地址。这个方案是不是可行?
方案二:打包的时候填写远程服务器地址,访问的时候是不是不用带上服务器地址了,而是直接cc.assetManager.loadBundle(“MapBundle”…去访问,我第一次使用,没找到资料。

我主要想请问下上面的两个方案是否可行?
另外走这种方案一和二的远程的方式,如果实现热更新呢,我看官方的热更新方案,主要还是对本地资源做处理比较,没有细看,不足之处还望大佬们海涵。

请问你的引擎版本是多少?报错日志发一下。

上面的方案都可行。你可以参考这个文档:https://docs.cocos.com/creator/3.1/manual/zh/editor/publish/publish-web.html?h=远程

参考这个论坛文章:我理解的 cocosCreator asset Bundle 版本2.4.4(跨域资源服务器+大厅子游戏模式+热更新+相关详细功能+相当易懂的介绍+demo)

cocos creator 2.42

Task :game:transformNativeLibsWithStripDebugSymbolForReleaseFeature
Task ‘:game:transformNativeLibsWithStripDebugSymbolForReleaseFeature’ is not up-to-date because:
No history is available.
All input files are considered out-of-date for incremental task ‘:game:transformNativeLibsWithStripDebugSymbolForReleaseFeature’.
Starting process ‘command ‘D:\android-ndk-r20b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip’’. Working directory: D:\client\build\jsb-default\frameworks\runtime-src\proj.android-studio\game Command: D:\android-ndk-r20b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip --strip-unneeded -o D:\client\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\build\intermediates\transforms\stripDebugSymbol\feature\release\0\lib\armeabi-v7a\libcocos2djs.so D:\client\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\build\intermediates\transforms\mergeJniLibs\feature\release\0\lib\armeabi-v7a\libcocos2djs.so
Successfully started process ‘command ‘D:\android-ndk-r20b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-strip’’
:game:transformNativeLibsWithStripDebugSymbolForReleaseFeature (Thread[Task worker for ‘:’ Thread 4,5,main]) completed. Took 0.219 secs.
:game:validateSigningReleaseFeature (Thread[Task worker for ‘:’ Thread 4,5,main]) started.

Task :game:validateSigningReleaseFeature
Task ‘:game:validateSigningReleaseFeature’ is not up-to-date because:
No history is available.
:game:validateSigningReleaseFeature (Thread[Task worker for ‘:’ Thread 4,5,main]) completed. Took 0.001 secs.
:game:packageReleaseFeature (Thread[Task worker for ‘:’ Thread 4,5,main]) started.

Task :sjcq:packageRelease
Task ‘:sjcq:packageRelease’ is not up-to-date because:
No history is available.
All input files are considered out-of-date for incremental task ‘:sjcq:packageRelease’.
Unable do incremental execution: full task run

Task :game:packageReleaseFeature
Task ‘:game:packageReleaseFeature’ is not up-to-date because:
No history is available.
All input files are considered out-of-date for incremental task ‘:game:packageReleaseFeature’.
Unable do incremental execution: full task run

Task :game:packageReleaseFeature FAILED
:game:packageReleaseFeature (Thread[Task worker for ‘:’ Thread 4,5,main]) completed. Took 53 mins 59.393 secs.
Task :sjcq:packageRelease FAILED
:sjcq:packageRelease (Thread[Task worker for ‘:’ Thread 5,5,main]) completed. Took 54 mins 12.753 secs.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:game:packageReleaseFeature’.

value (199236) > 0x0000ffff

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

2: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:sjcq:packageRelease’.

value (199140) > 0x0000ffff

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

  • Get more help at https://help.gradle.org

BUILD FAILED in 1h 30m 51s
115 actionable tasks: 115 executed
执行命令出错,返回值:1。

您好,不好意思哈,我追问一个问题,你说上面两种远程方式都可以:假如使用这种方式:
cc.assetManager.loadBundle(“http://192.168.6.149:8090/remote/MapBundle”…
也会优先加载本地的缓存么。

如果本地已经有下载过一次了,那么就会有限读取缓存资源。

1赞

好的,多谢啦

大佬,看一下这个问题呢~~,遇到一个奇异的问题。

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。