Package errors when building for Android on Unity 2022.3.39f1
I am trying to enable wallet logins for the Android version of my game using the Solana.Unity-SDK. But I am getting too many errors. I have also tried creating a fresh project with nothing else in it and it stops building after importing the SDK.
I have attached the screenshot from the new project with nothing else in it except for the Solana.Unity-SDK. It builds for Android fine without the SDK (both before installing it and after removing it from the Package Manager), when I hit 'build and run'. The Unity version is 2022.3.39f1.
I also encountered the same problem, using Unity 2021.3.45 and 2022.3.62. What could be the reason?
error info:
Building Library\Bee\artifacts\Android\ManagedStripped failed with output:
C:\Program Files\Unity 2022.3.62f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\17804192058334798717.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable1 assemblies) at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type) at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference) at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember) at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason) at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet1 typesAlreadyVisited)
at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.UnityRun(UnityLinkContext context, UnityPipeline p, LinkRequest linkerOptions, TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()
UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Also had the same problem building for webGL
I am trying to enable wallet logins for the Android version of my game using the Solana.Unity-SDK. But I am getting too many errors. I have also tried creating a fresh project with nothing else in it and it stops building after importing the SDK.
I have attached the screenshot from the new project with nothing else in it except for the Solana.Unity-SDK. It builds for Android fine without the SDK (both before installing it and after removing it from the Package Manager), when I hit 'build and run'. The Unity version is 2022.3.39f1.
![]()
The issue is the files being in the resource folder i believe unity ignores them and doesn't compile .meta files when its loading up.
You have two options the way i see it:
-
move the files that are missing the meta files to assets and unity should generate the appropriate files
-
use this when you import the git url :
https://github.com/magicblock-labs/Solana.Unity-SDK.git#v1.2.8
and use V1.2.8 until this one is updated