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

Errors build app bundle for google play

Discussion in 'Editor & General Support' started by nitro0198, May 17, 2022.

  1. nitro0198

    nitro0198

    Joined:
    Dec 11, 2020
    Posts:
    6
    Hi everyone, I am trying to publish my game on google play but I have this error.

    "Your app's current target API level is 28, but the minimum target API level must be 30 to ensure that your app is based on the latest APIs that are optimized for security and good performance. Change your target API level. app with at least 30 "

    To try to solve the problem, I downloaded the API 30 via Android Studio and copied the affected folder to the path C: \ Program Files \ Unity \ Hub \ Editor \ 2020.1.3f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ SDK

    ((Basically I copied the API folders from the path
    "C: \ Users \ User \ AppData \ Local \ Android \ Sdk \ platforms"

    to the unity path
    "C: \ Program Files \ Unity \ Hub \ Editor \ 2020.1.3f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ SDK \ platforms "

    But now I think I've done some damage, because if I was able to build before now I can't do it anymore because Unity gives me a lot of errors, now I show them to you..

    These are the unity errors:

    1)
    Failed running C:\Program Files\Unity\Hub\Editor\2020.1.3f1\Editor\Data\Tools/InternalCallRegistrationWriter/InternalCallRegistrationWriter.exe -output="C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\UnityICallRegistration.cpp" -summary="C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\ICallSummary.txt" -assembly="C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.AndroidJNIModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.AnimationModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.AudioModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.CoreModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.DirectorModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.GridModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.IMGUIModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.InputLegacyModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.InputModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.ParticleSystemModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.Physics2DModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.PhysicsModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.SharedInternalsModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.SpriteShapeModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.SubsystemsModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.TextCoreModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.TextRenderingModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.TilemapModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.UIModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.UnityAnalyticsModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.UnityConnectModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.UnityWebRequestModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.VideoModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.VRModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.XRModule.dll;C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\tempStrip\UnityEngine.dll"
    stdout:
    stderr:
    Eccezione non gestita: System.UnauthorizedAccessException: Accesso al percorso 'C:\Users\Utente\Desktop\AliensInDanger\Temp\StagingArea\assets\bin\Data\Managed\ICallSummary.txt' negato.
    in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    in System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    in System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
    in System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
    in System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
    in Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.Run(InternalCallOptions options)
    in Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.ParseOptionsAndRun(String[] args)
    in Unity.InternalCallRegistrationWriter.Program.Main(String[] args)
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
    UnityEditorInternal.Runner:RunManagedProgram(String, String)
    UnityEditorInternal.AssemblyStripper:GenerateInternalCallSummaryFile(String, String, String)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)
    UnityEditorInternal.IL2CPPBuilder:Run()
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)


    2)
    Exception: C:\Program Files\Unity\Hub\Editor\2020.1.3f1\Editor\Data\Tools/InternalCallRegistrationWriter/InternalCallRegistrationWriter.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.AssemblyStripper.GenerateInternalCallSummaryFile (System.String icallSummaryPath, System.String managedAssemblyFolderPath, System.String strippedDLLPath) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>: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 <5f8140421e7d41ada100b629c3033aa7>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <5f8140421e7d41ada100b629c3033aa7>: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 <701f6580abad44cfb237a543dcd0d94b>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    3)
    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    4)
    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0027c] in <701f6580abad44cfb237a543dcd0d94b>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <701f6580abad44cfb237a543dcd0d94b>:0
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     

    Attached Files:

    • 1.JPG
      1.JPG
      File size:
      88.8 KB
      Views:
      154
    • 2.JPG
      2.JPG
      File size:
      85.8 KB
      Views:
      159
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    The only way that seems to work consistently for Android SDK updates is to REMOVE ALL SDKs first, using whatever method you like, then install only the one you want, along with its tools.

    Once that's good, go tell Unity about it in the usual place(s).
     
  3. nitro0198

    nitro0198

    Joined:
    Dec 11, 2020
    Posts:
    6
    So should I delete the folders I don't need from the path:

    "C: \ Program Files \ Unity \ Hub \ Editor \ 2020.1.3f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ SDK \ platforms "
    and leave only the one I need?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    The folder you list above appears to be what comes with Unity... Are you sure that's the installed SDK??! I don't think so... usually it goes in
    .android
    folder or elsewhere. The above is usually just the source.

    I'm just saying, outside of Unity, pretend you're just a vanilla Android developer: uninstall all your old SDKs before upgrading to a new one when working with Android, that's all.