Comments (30)
@Redth @mattleibow I'm also having this issue. Any idea when the fix will be released?
from androidx.
@Redth Could you please release a nuget with the fix ?
from androidx.
The problem seems to be on linker
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
from androidx.
@Mario-HL-Duarte can you attach a repro?
from androidx.
Same problem for me too
from androidx.
@hudait do you have a repro you can attach?
from androidx.
Trying to reproduce here as well.
I'm using d8, r8, AndroidX nugets with the migration package, as well as AOT / LLVM and Link "Sdk Assemblies Only" here and it's working ok.
A repro would be helpful indeed, thanks!
from androidx.
@hudait do you have a repro you can attach?
Can you please send me your email address to [email protected]?
If it is welcomed i would send you send the link to a project via mail.
from androidx.
I am trying to recreate the problem in another application and attach it to you.
The problem was introduced in Visual Studio 16.4.0 Preview 1.
I installed the latest stable version of Visual Studio 2019 16.3.1 and was able to compile the application normally.
from androidx.
I am trying to recreate the problem in another application and attach it to you.
The problem was introduced in Visual Studio 16.4.0 Preview 1.
I installed the latest stable version of Visual Studio 2019 16.3.1 and was able to compile the application normally.
Yeah i also think this is more an visual studio issue
from androidx.
Same problem for me too.
It's been introduced in Visual Studio 16.4.0 pre-1 and it's still happening in pre-3 !! No issue when using VS 16.3.7.
It's only happening when android linker is set to "full" or "sdkonly" (no problem when disabling linker).
@mattleibow @Redth Any progress ?
from androidx.
I am using Visual studio mac and I am facing the same problem.
I was able to build the solution with D8/R8/Linker(sdk only) and "AndroidX" in the current stable Xamarin.Android version, but not with preview Xamarin.Android 10.1.0.30.
I only installed Xamarin.Android preview version, not the entire preview update set. I guess this issue has been introduced from the Xamarin.Android preview version.
I need to use the preview Xamarin.Android version, which contains the fix of the KotlinX-android issue. I can keep working for my project with Linker off, but this should be fixed. Please check this issue out.
I have tried to add some AndroidX related dlls to "ignore assemblies" and also tried Linker rule to skip any assemblies that related to AndroidX in Linker process, but no luck so far...
from androidx.
Still not fixed in visual studio 16.4.0-pre.5.0
from androidx.
Still having the same error with xamarin.androidx.migration\1.0.0-preview06 and Visual Studio 16.4.0-pre.6.0.
@Redth Is this issue being investigated ? I hope it will be fixed in Visual Studio 16.4.0 stable release. Thanks
from androidx.
@tranb3r do you have a repro solution you can share? I can't reproduce the same errors here, everything works great with r8/d8/linker sdk only with the latest AndroidX packages.
from androidx.
@Redth
Here is a repro project
No issue when building in Debug (linker=None).
When building in Release (linker=SdkOnly), no issue when using visual studio 16.3.10, however build fails when using visual studio 16.4.0-pre.6.0.
from androidx.
Any update ?
from androidx.
I have the same issue in the release version of Visual Studio 16.4 using the preview06 version of the Migration package. As others have stated it only occurs if the linker is enabled.
@Redth I have recreated a repro based on the Xamarin.Android template project:
LinkerTestApp.zip
I'm not 100% sure, but it seems to be related on a nuget dependency issue, since the issue only occurs if the project contains another package dependant on the Android support libraries.
For this example I have used the Microsoft.IdentityModel.Clients.ActiveDirectory
package to repro the issue.
Error:
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : The method or operation is not implemented.
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.Pdb.NativePdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.Pdb.PdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.GetSymbolWriter(ModuleDefinition module, String fq_name, ISymbolWriterProvider symbol_writer_provider, WriterParameters parameters)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 117
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 50
1>C:\Users\appdev\.nuget\packages\xamarin.androidx.migration\1.0.0-preview06\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute() in D:\a\1\s\source\Xamarin.AndroidX.Migration\BuildTasks\CecilfyFiles.cs:line 35
from androidx.
Not having looked at the sample yet, one thing I immediately notice is that Microsoft.IdentityModel.Clients.ActiveDirectory
is depending on Android Support 28.x, but instead 27.x, which isn't technically a supported migration path. I'm not 100% sure that's the cause of this yet, but it's something to keep in mind as we investigate.
@mattleibow can you have a look at this repro?
from androidx.
Could you please also take a look at the repro I've added a few days ago. It's a very simple project. The nuget that seems to cause trouble in my case is Xam.Plugin.Iconize.Material.
Thanks
from androidx.
Having a look right now. Will see if there is something we can do ASAP.
from androidx.
It would be great if a NuGet package with this fix could be published.
I am currently stuck on reverting to Visual Studio 16.3.10 to solve this issue (the issue doesn't occur for me on that version).
from androidx.
Any workaround for this issue? Even if I set it Linking to None
- it still fails on azure pipelines on macos. I tried downgrading packages - no luck
from androidx.
Updating to version 1.0.0-rc1 of the Xamarin.AndroidX.Migration package fixed this issue for me.
from androidx.
Same for me: rc1 fixes this issue, at last...
Thank you !
from androidx.
I have the same problem (updating with rc1 too)
from androidx.
Same hare, but updating to rc1 doesn't work. Then I'm geting another error that I should install Xamarin.AndroidX.AppCompat.Resources rc1, but it's already installed... Any solutions?
from androidx.
Although, there is already 1.1.0 version available we still having different kinds of linking error related to AndroidX + Support configuration.
Trying different version the one that works for us now is 1.0.0-rc3
.
from androidx.
@ignasbagdonas, even though this issue is closed already and I expect you might also have solved the issue, I thought I'd still comment on this here, as I've run into this on a migration project myself recently. It mostly likely concerns an incorrect registration of Xamarin.AndroidX.AppCompat.Resources
in your project-file. That is, though the file is supposed to have been auto-included, it doesn't install correctly. My way of fixing it involved opening the project file for editing, copying the project-inclusion for Xamarin.AndroidX.AppCompat
, and then adjusting that to get one for Xamarin.AndroidX.AppCompat.Resources
.
from androidx.
I'm a newbie in Xamarin, but I'm having the same problem here
I actually created a simple project (xamarin forms), when I saw the project is using android.support I wanted to migrate to androidx. I have added androidx.migration to my project. It told me that I need to install more dependencies into the project. which I did.
Now I'm having the following error:
Xamarin.AndroidX.Migration.targets(131, 9): Could not find 30 Android X assemblies, make sure to install the following NuGet packages:
- Xamarin.AndroidX.Lifecycle.LiveData
- Xamarin.AndroidX.Browser
- Xamarin.Google.Android.Material
- Xamarin.AndroidX.Legacy.Support.V4
You can also copy-and-paste the following snippet into your .csproj file:
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.0.2-alpha03" />
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.2-alpha01" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.1.0.4-rc3" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.4" />
This is my android.csproj file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>…</ProjectGuid>
<ProjectTypeGuids>…</ProjectTypeGuids>
<TemplateGuid>…</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>…</RootNamespace>
<AssemblyName>…</AssemblyName>
<Deterministic>True</Deterministic>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.1.0.6" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.3.0.3" />
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.7.1" />
<PackageReference Include="Xamarin.Forms" Version="4.6.0.1141" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.0.2-alpha03" />
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.2-alpha01" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.1.0.4-rc3" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.4" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.xml" />
<AndroidResource Include="Resources\layout\Toolbar.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xamarin_app\xamarin_app.csproj">
<Project>…</Project>
<Name>…</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
from androidx.
Related Issues (20)
- CustomTabsSession.RequestPostMessageChannel() throws exception HOT 1
- Xamarin.Androidx.Lifecycle.Common error while using Xamarin.Firebase.Messaging HOT 3
- Type-forwarding for binding libraries HOT 3
- Deprecate Xamarin.AndroidX.Legacy.Support.V4 HOT 2
- Bind "androidx.credentials" HOT 16
- [Bug] Lottie package throwing error while creating the release build in Android after switching to target framework 13 HOT 26
- Bind "androidx.health:health-services-client" HOT 25
- Releases - Where are they? HOT 1
- [Bug] `androidx.credentials` null Exception HOT 6
- com.android.tools.r8.ResourceException: com.android.tools.r8.internal.vc: I/O exception while reading HOT 3
- AndroidX.Credentials ICredentialManagerCallback wrong parameter types. HOT 2
- Can't get past `javac: error: package androidx.fragment.app does not exist` HOT 4
- CameraSelector.Builder().AddCameraFilter effectively unusable (cannot select specific camera lens) HOT 2
- Xamarin.AndroidX.Biometric not building starting at version 1.1.0.17 (.NET MAUI) HOT 3
- Issue with CustomTabsActivityManager and multiple activities HOT 3
- Bind "androidx/emoji2/emoji2-picker"
- Announcement: Xamarin.Android and .NET 6 no longer supported
- "Specified cast is not valid" when using SetOnItemSelectedListener of NavigationBarView HOT 6
- `Xamarin.Jetbrains.Annotations` namespace clash with `JetBrains.Annotations` causes CS0433 build failure HOT 1
- Can't install Xamarin.AndroidX.AppCompat and RecyclerView latest versions into Xamarin project HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidx.