Skip to content

[Bug] [Android] System.IO.FileNotFoundException when <BundleAssemblies>True</BundleAssemblies> #64

@RadoslawKubas

Description

@RadoslawKubas

Description

After upgrade from Xamarin.Forms 4.4.0.991640 to 4.5.282-pre4 I noticed that when

<BundleAssemblies>True</BundleAssemblies>

app crash on start with exception

System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.AndroidX.AppCompat.Resources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

My working setup for release in 4.4 is

<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM>
<BundleAssemblies>True</BundleAssemblies>

in 4.5 everything works fine only if

<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM> 
<BundleAssemblies>False</BundleAssemblies>

Steps to Reproduce

  1. Create new solution
  2. Upgrade Xamarin to 4.5.0.282-pre4
  3. Set:
<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM>
<BundleAssemblies>True</BundleAssemblies>
  1. Run app on the real device

Expected Behavior

App starts.

Actual Behavior

App crash with System.IO.FileNotFoundException exception.

Basic Information

  • Version with issue: 4.5.0.282-pre4
  • Last known good version: 4.4.0.991640
  • IDE: Visual Studio 2019
  • Platform Target Frameworks:
    • Android: Xamarin.Android 10.1
  • Android Support Library Version: 28.0.0.03, AndroidX 1.1.0
  • Nuget Packages:
  • Affected Devices: all

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions