打包报错 记录

记录1

 报错信息:

Writing asset file failed 

Writing library/metadata/   Unable to write file.

OS error:No space left to device

原因:磁盘满了

 

 

记录2 

CommandInvokationFailure: Failed to compress IL2CPP symbol files.
C:/g/unity2017429/Unity/Editor/Data\Tools\7z.exe a -tzip -mx0 "Merge Heroes_dev_v49_10_09_1048-1.0-v49.symbols.zip" ./

stderr[


System ERROR:
���̿ռ䲻�㡣
]
stdout[

7-Zip (a) [64] 16.04 ZS : Copyright (c) 1999-2016 Igor Pavlov : 2017-03-20

Scanning the drive:
1 folder, 2 files, 651321088 bytes (622 MiB)

Creating archive: Merge Heroes_dev_v49_10_09_1048-1.0-v49.symbols.zip

Items to compress: 3

]
exit code: 2
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b1f99a18848c44999126b98c213cdf10>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b1f99a18848c44999126b98c213cdf10>:0)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <b1f99a18848c44999126b98c213cdf10>:0)
UnityEditor.Android.PostProcessor.Tasks.ZipIl2cppSymbols.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b1f99a18848c44999126b98c213cdf10>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b1f99a18848c44999126b98c213cdf10>:0)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)
BuildApk:BuildAndroidApk() (at Assets/FrameworkBase/Editor/BuildApk/BuildApk.cs:159)

 提示这个错一般是生成包的盘符没有内存了

 

记录3

CommandInvokationFailure: Gradle build failed.
F:/UnityBuildApkConfig/dabao/jdk1.8.0_73\bin\java.exe -classpath "C:\g\unity2017429\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\code\ZombieBattle\Client\CommonFramework\Temp\gradleOut\build.gradle'

* What went wrong:
Could not compile build file 'D:\code\ZombieBattle\Client\CommonFramework\Temp\gradleOut\build.gradle'.
> startup failed:
General error during class generation: 255

java.lang.ArrayIndexOutOfBoundsException: 255

 

一般这个错误是指StreamingAssets下不压缩文件过多超出255导致的,因为在unity安装目录下

C:\g\unity2017429\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates

文件中

aaptOptions {

noCompress '.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**

}

标红地方是StreamingAssets文件下下东西,这样打包如果StreamingAssets下文件超过255会导致都不压缩进入包内,在打包过程的时候

'D:\code\ZombieBattle\Client\CommonFramework\Temp\gradleOut\build.gradle'

文件内noCompress后面会跟超过255个标识,导致失败,所以这里吧StreamingAssets下文件除了自己生成的一些文件(下图.bytes就是自己生成的文件,如果压缩这个文件还需要去匹配解压这个是unity自己处理,所以自己生成的这里设置不压缩,其他文件都压缩,unity会自己解压适配)

aaptOptions {

noCompress '.unity3d', '.ress', '.resource', '.obb','.bytes'

}

 

 

记录4

 

Tag: FirebaseCrashlytics
Message: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.

 

 

 修复:

增加  apply plugin: 'com.google.firebase.crashlytics'

 

posted @ 2020-08-13 09:58  酉乐  阅读(1012)  评论(0编辑  收藏  举报