Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Can't build APK

Discussion in 'Android' started by Kraken77777, Feb 9, 2021.

  1. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    I can't make APK file. So I think that it's bag. Can you help me?
    I attached screenshot of errors
     

    Attached Files:

  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    That's only a title of the error, you must show the contents, it should be somewhere below in the console
     
    Kraken77777 likes this.
  3. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2020.2.3f1\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe', CommandLine='--useprebuiltbuildprogram --no-colors', CurrentDirectory='Library/Il2cppBuildCache/Android/armeabi-v7a',

    System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at :0) UnityEditor.Utils.Program.Start () (at :0) UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0) UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <a936841cea2147a2a55ea27843fa46ae>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo, System.String generatedCppOutputDirectory) (at <a936841cea2147a2a55ea27843fa46ae>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.Boolean platformSupportsManagedDebugging) (at <a936841cea2147a2a55ea27843fa46ae>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <a936841cea2147a2a55ea27843fa46ae>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    I still don't see the error, can you attach editor.log?
     
    Kraken77777 likes this.
  5. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    Ok, sorry I am a bit stupid. (I am very stupid)
     
    Last edited: Feb 10, 2021
  6. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    I will attach cs file, because I can't attach txt
     

    Attached Files:

    • Log.cs
      File size:
      67.7 KB
      Views:
      182
  7. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    The error is this:
    Code (CSharp):
    1. Native error= ...
    (Can't paste russian letters)

    I am not sure why it would need elevated privileges, you could try installing Unity into folder which is not under admin, that may help you. Alternatively, if you have antivirus, tell it to exclude C:\Program Files\Unity\Hub\Editor\2020.2.3f1 folder
     
    Kraken77777 likes this.
  8. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    So I must move folder with Unity 2020.2.3f1 into another folder?
    For example on my Desktop
     
    Last edited: Feb 10, 2021
  9. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    Not move, but uninstall and then install with custom folder specified, for C:\MyUnityInstalls.
     
    Kraken77777 likes this.
  10. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    Yess... But there is a new problem
     

    Attached Files:

    • Log.cs
      File size:
      78.2 KB
      Views:
      182
  11. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    It's because your path has russian characters inside - 'C:\Users\zawur\OneDrive\.....\gg\New Unity Project\Temp\StagingArea\Il2Cpp\il2cppOutput\Data\Resources'.

    Create a folder C:\UnityProjects and build there
     
    Kraken77777 likes this.
  12. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    I did this, but....
     

    Attached Files:

    • Log.cs
      File size:
      78.9 KB
      Views:
      191
  13. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    Kraken77777 likes this.
  14. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
  15. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,669
    Is this an empty project ? I tried reproducing here, but for me it works fine. From the log you posted, it seems there are additional files which are being compiled, for ex., UnityNotificationData.h.

    If this is not an empty project, could you report a bug https://unity3d.com/unity/qa/bug-reporting with repro project attached.
     
  16. Kraken77777

    Kraken77777

    Joined:
    Feb 8, 2021
    Posts:
    9
    It isn't an empty project and thank you for your help