RenPy中文空间

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 584|回复: 4

[已解决] 安卓打包失败

[复制链接]
发表于 2020-12-15 02:44:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
本帖最后由 BuErShen 于 2020-12-18 00:00 编辑

Ren'Py 7.3.5.606

正在更新工程。

正在创建资源目录。

正在打包内部数据。

正在使用 Gradle 构建应用包。
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
:app:preBuild UP-TO-DATE
:renpyandroid:preBuild UP-TO-DATE
:renpyandroid:preReleaseBuild UP-TO-DATE
:renpyandroid:checkReleaseManifest UP-TO-DATE
:renpyandroid:processReleaseManifest UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:renpyandroid:compileReleaseAidl UP-TO-DATE
:app:compileReleaseAidl UP-TO-DATE
:renpyandroid:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseRenderscript UP-TO-DATE
:app:checkReleaseManifest UP-TO-DATE
:app:generateReleaseBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceRelease UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:renpyandroid:compileReleaseRenderscript UP-TO-DATE
:renpyandroid:generateReleaseResValues UP-TO-DATE
:renpyandroid:generateReleaseResources UP-TO-DATE
:renpyandroid:packageReleaseResources UP-TO-DATE
:app:mergeReleaseResources
:app:createReleaseCompatibleScreenManifests UP-TO-DATE
:app:processReleaseManifest
:app:splitsDiscoveryTaskRelease UP-TO-DATE
:renpyandroid:platformAttrExtractor UP-TO-DATE
:renpyandroid:generateReleaseRFile UP-TO-DATE
:app:processReleaseResources
:app:generateReleaseSources
:renpyandroid:generateReleaseBuildConfig UP-TO-DATE
:renpyandroid:prepareLintJar UP-TO-DATE
:renpyandroid:generateReleaseSources UP-TO-DATE
:renpyandroid:javaPreCompileRelease UP-TO-DATE
:renpyandroid:compileReleaseJavaWithJavac UP-TO-DATE
:renpyandroid:processReleaseJavaRes NO-SOURCE
:renpyandroid:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease UP-TO-DATE
:app:javaPreCompileRelease UP-TO-DATE
:app:compileReleaseJavaWithJavac
:app:compileReleaseNdk NO-SOURCE
:app:compileReleaseSources
:app:lintVitalRelease
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:renpyandroid:mergeReleaseShaders UP-TO-DATE
:renpyandroid:compileReleaseShaders UP-TO-DATE
:renpyandroid:generateReleaseAssets UP-TO-DATE
:renpyandroid:packageReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets
:app:transformClassesWithDexBuilderForRelease
:app:transformDexArchiveWithExternalLibsDexMergerForRelease
:app:transformDexArchiveWithDexMergerForRelease
:app:mergeReleaseJniLibFolders UP-TO-DATE
:renpyandroid:compileReleaseNdk NO-SOURCE
:renpyandroid:mergeReleaseJniLibFolders UP-TO-DATE
:renpyandroid:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:renpyandroid:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:app:processReleaseJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForRelease
:app:validateSigningRelease UP-TO-DATE
:app:packageRelease
Expiring Daemon because JVM Tenured space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
Expiring Daemon because JVM Tenured space is exhausted
Expiring Daemon because JVM Tenured space is exhausted
Expiring Daemon because JVM Tenured space is exhausted
:app:packageRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> org.gradle.tooling.BuildException (no error message)

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageRelease'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.tooling.BuildException
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:133)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:110)
        at kotlin.sequences.SequencesKt___SequencesKt$onEach$1.invoke(_Sequences.kt:1260)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:148)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:108)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:132)
        at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:152)
        at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:633)
        at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:663)
        at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:654)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.transform(BuildElements.kt:140)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.into(BuildElements.kt:115)
        at com.android.build.gradle.internal.scope.BuildElementActionScheduler.into(BuildElementActionScheduler.kt:32)
        at com.android.build.gradle.tasks.PackageAndroidArtifact.doFullTaskAction(PackageAndroidArtifact.java:393)
        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        ... 29 more
Caused by: java.lang.OutOfMemoryError
        at com.android.ide.common.internal.WaitableExecutor.waitForAllTasks(WaitableExecutor.java:215)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.transform(BuildElements.kt:125)
        ... 44 more
Caused by: java.lang.OutOfMemoryError: Java heap space
        at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:165)
        at com.android.apkzlib.zip.utils.ByteTracker.fromStream(ByteTracker.java:49)
        at com.android.apkzlib.zip.ZFile.makeStoredEntry(ZFile.java:1654)
        at com.android.apkzlib.zip.ZFile.add(ZFile.java:1763)
        at com.android.apkzlib.zfile.ApkZFileCreator.writeFile(ApkZFileCreator.java:158)
        at com.android.builder.internal.packaging.IncrementalPackager.updateFiles(IncrementalPackager.java:176)
        at com.android.builder.internal.packaging.IncrementalPackager.updateAssets(IncrementalPackager.java:238)
        at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:666)
        at com.android.build.gradle.tasks.PackageAndroidArtifact.splitFullAction(PackageAndroidArtifact.java:496)
        at com.android.build.gradle.tasks.PackageAndroidArtifact.lambda$doFullTaskAction$2(PackageAndroidArtifact.java:388)
        at com.android.build.gradle.tasks.PackageAndroidArtifact$$Lambda$1187/207042023.invoke(Unknown Source)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:121)
        at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:110)


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

BUILD FAILED in 1m 38s
46 actionable tasks: 12 executed, 34 up-to-date




构建似乎已失败。

评分

参与人数 1硬币 -120 收起 理由
BuErShen -120 萌新首次不警告,但扣分,原因:见回复.

查看全部评分

发表于 2020-12-16 15:13:25 | 显示全部楼层
内存溢出了。

给gradle配置更大的内存;
修改app-build.gradle中打包规则,让renpy一次只打包一种架构的apk;
压缩图片视频缩减游戏的体积。

以上常见三种解决方式。

可以查看这个帖子对照操作:
https://www.renpy.cn/forum.php?m ... 259&fromuid=374

评分

参与人数 1干货 +1 收起 理由
BuErShen + 1 感谢解答!

查看全部评分

回复 支持 反对

使用道具 举报

发表于 2020-12-17 18:50:05 | 显示全部楼层
新人发帖前,先看本版块置顶帖:“解疑答难“版规与萌新提问前必看

  • 先搜索版区内,是否已有内容相同相似的主题帖,以避免重复发帖。
  • 标题:写清具体求助问题请勿使用“萌新求助、大佬请进、这是为什么?帮帮我”等为求助帖标题,如因没有写清标题而不能得到解决的问题或被版主处罚,请勿抱怨。
回复 支持 反对

使用道具 举报

发表于 2020-12-25 13:58:52 | 显示全部楼层
小猪 发表于 2020-12-16 15:13
内存溢出了。

给gradle配置更大的内存;

我设置了只一种apk,但还是会生成两个apk,且占用的内存是游戏体积的2.6倍左右
回复 支持 反对

使用道具 举报

发表于 2020-12-25 17:14:20 | 显示全部楼层
冯诺依曼 发表于 2020-12-25 13:58
我设置了只一种apk,但还是会生成两个apk,且占用的内存是游戏体积的2.6倍左右 ...

截图看看文件你是怎么修改的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|RenPy中文空间 ( 苏ICP备17067825号 | 苏公网安备 32092302000068号 )

GMT+8, 2021-1-26 14:15 , Processed in 0.036304 second(s), 14 queries , File On.

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表