Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create an Android release version with latest release #148

Open
davefxy opened this issue Oct 30, 2020 · 4 comments
Open

Unable to create an Android release version with latest release #148

davefxy opened this issue Oct 30, 2020 · 4 comments

Comments

@davefxy
Copy link

davefxy commented Oct 30, 2020

I got the following error when a tried to create an Android Release version of an app using the latest PancakeView version :
Mono.Cecil.ResolutionException: Failed to resolve System.Int32 Xamarin.Forms.PancakeView.Resource/Animation::abc_fade_in
The debug version built just fine.
NOTE:
Ooooops, This occurred when I was targeting Android 11.0. When I went back to targeting Android 10.0 everything workd.
More details:

  • 4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.HandleUnresolvedField(FieldReference reference)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessQueue()
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: --- End of inner exception stack trace ---
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessQueue()
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.Process()
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Mono.Linker.Pipeline.Process(LinkContext context)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
    4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1645,5): error XALNK7000: at Xamarin.Android.Tasks.AndroidTask.Execute()
@lndalmd
Copy link

lndalmd commented Nov 16, 2020

Same here, but already targeting to Android 10.0

Description:

Mono.Linker.MarkException: Error processing method: 'System.Void MyProject.Droid.Resource::UpdateIdValues()' in assembly: 'MyProject.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 Xamarin.Forms.PancakeView.Resource/Animation::abc_fade_in
at Mono.Linker.Steps.MarkStep.HandleUnresolvedField (Mono.Cecil.FieldReference reference) [0x00013] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00024] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x0002e] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000c2] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001b1] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0

--- End of inner exception stack trace ---

at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x001dd] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.AndroidTask.Execute () [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0

@lndalmd
Copy link

lndalmd commented Nov 16, 2020

After change Linker behavior to LinkNone in Droid project, it compiled.

@Deepfreezed
Copy link

Deepfreezed commented Nov 18, 2020

Having the same issue, it would work with linker off, but we need to have linker for production release. Version 2.1.0.714 works. This is an issue with the latest version 2.3.0.759.

Linker works when targeting Android 10. Error happens when targeting Android 11 with linking on.

@InquisitorJax
Copy link

same :(

Can confirm: downgrade 2.1.0.714 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants