Skip to content

Missing androidx.window.[extensions|sidecar] warnings #6809

Description

@gmck

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.)

Affected platform version

VS2022 17.2.0 Preview 1.0

Description

After upgrading all my nugets to the latest versions, the following are new warnings.

Severity	Code	Description	Project	File	Line	Suppression State
Warning		Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
        C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
          Project file item includes which caused reference "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
            System.Numerics.Vectors
    References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
        C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
          Project file item includes which caused reference "C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll".
            C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
            C:\Users\gmcke\.nuget\packages\xamarin.googleplayservices.safetynet\117.0.1.3\lib\monoandroid90\Xamarin.GooglePlayServices.SafetyNet.dll	OBDNowPros	C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	2301	
Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
Warning		Missing class androidx.window.extensions.WindowExtensions (referenced from: androidx.window.extensions.embedding.ActivityEmbeddingComponent androidx.window.embedding.EmbeddingCompat$Companion.embeddingComponent() and 3 other contexts)	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\R8		
Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar		 	0	
Warning		MSB3073: The command ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" -s 1A141FDF600D7C uninstall -k "com.glmsoftware.obdnowpros"" exited with code 1.		 	0	
Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar		 	0	
Warning		MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
        C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
          Project file item includes which caused reference "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
            System.Numerics.Vectors
    References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
        C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
          Project file item includes which caused reference "C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll".
            C:\Users\gmcke\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
            C:\Users\gmcke\.nuget\packages\xamarin.googleplayservices.safetynet\117.0.1.3\lib\monoandroid90\Xamarin.GooglePlayServices.SafetyNet.dll		 	0	

Also attaching the MS Build log. Do you need anything else from me?

Could you please advise about the following, where it comes from etc?
Missing class androidx.window.extensions.WindowExtensions (referenced from: androidx.window.extensions.embedding.ActivityEmbeddingComponent

Build04032022.zip

Steps to Reproduce

N/A

Did you find any workaround?

The app deploys and runs just fine.

Relevant log output

No response

Activity

  1. added
    Area: App+Library BuildIssues when building Library projects or Application projects.
    needs-triageIssues that need to be assigned.
    on Mar 4, 2022
  2. MagicAndre1981 commented on Mar 4, 2022

    @MagicAndre1981

    I've already reported this some time ago via #6375, the app still works for me even if you see the messages.

  3. tipa commented on Mar 6, 2022

    @tipa

    I also see those XA4218 warnings that I think have nor seen before in VS 17.0
    Also, deploying an app to the simulator becomes a gamble. 90% of the times when I change my .xml files (e.g. styles.xml) and try to build+deploy the app, if fails with:

    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
    
  4. MagicAndre1981 commented on Mar 7, 2022

    @MagicAndre1981

    I also see those XA4218 warnings that I think have nor seen before in VS 17.0

    yes, this is new, but I also get it in VS2019 16.11.10 and started since last AndroidX Nuget updates from end of last week.

  5. jonathanpeppers commented on Mar 7, 2022

    @jonathanpeppers
    Member

    @jpobst / @moljac would you know if there is something new about these libraries?

    Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
    Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
    Warning		Missing class androidx.window.extensions.WindowExtensions (referenced from: androidx.window.extensions.embedding.ActivityEmbeddingComponent androidx.window.embedding.EmbeddingCompat$Companion.embeddingComponent() and 3 other contexts)	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\R8		
    Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar		 	0	
    Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar
    

    Would these be something new where you define <uses-library> for these in your AndroidManifest.xml? We might need to add some build-time support for this.

  6. dellis1972 commented on Mar 7, 2022

    @dellis1972
    Contributor

    Also, deploying an app to the simulator becomes a gamble. 90% of the times when I change my .xml files (e.g. styles.xml) and try to build+deploy the app, if fails with:

    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
    

    We are tracking this in #6652. The IDE team have an internal ticket which they are working on. I'll keep #6652 as up to date as I can.

  7. moljac commented on Mar 7, 2022

    @moljac
    Contributor

    @conceptdev Would you be so kind and help? Do you have any experience with this?

    @jpobst / @moljac would you know if there is something new about these libraries?

    Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
    Warning		Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\obj\Release\120\android\AndroidManifest.xml		
    Warning		Missing class androidx.window.extensions.WindowExtensions (referenced from: androidx.window.extensions.embedding.ActivityEmbeddingComponent androidx.window.embedding.EmbeddingCompat$Companion.embeddingComponent() and 3 other contexts)	OBDNowPros	C:\ProjectsVS2022Preview\Android12Pros\OBDNowPro\R8		
    Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar		 	0	
    Warning		XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar
    

    Would these be something new where you define <uses-library> for these in your AndroidManifest.xml? We might need to add some build-time support for this.

  8. jpobst commented on Mar 7, 2022

    @jpobst
    Contributor

    I cannot find these types in any of Google's AndroidX packages:

    • androidx.window.extensions.WindowExtensions
    • androidx.window.extensions.embedding.ActivityEmbeddingComponent

    But the latest releases of AndroidX do now generally have a dependency on AndroidX.Window (via Xamarin.AndroidX.SlidingPaneLayout).

  9. conceptdev commented on Mar 7, 2022

    @conceptdev

    It's my understanding that the sidecar and extensions code are what we ship on device (ie. Surface Duo), to provide the OEM-specific implementation of the Window Manager dual-screen/foldable API surface. Other OEMS (like Samsung) would ship their own packages (again, in their OS).

    Android native (Kotlin/Java) apps that consume AndroidX Window Manager do not reference these libraries via gradle. Not sure where these warnings are coming from in Xamarin.Android.

    On maven.google.com I don't see corresponding packages there either.

  10. jonathanpeppers commented on Mar 7, 2022

    @jonathanpeppers
    Member

    @jpobst do any of the .aar files contain an AndroidManifest.xml file with new <uses-library/> entries?

  11. 23 remaining items

  12. moljac commented on May 26, 2022

    @moljac
    Contributor

    @jonathanpeppers

    We could remove these warnings, but I'm not sure that's the right path.

    I would not do that. Warnings are not caused by us.

    These libraries are passed to d8/r8 as a "reference" and they don't get included on the app. They are normally libraries that OEMs provide on certain devices. If we had them we could solve the XA4218 warning, and the d8/r8 warning.

    I found one library:

    This leads to correct official location

    https://maven.google.com/web/index.html?q=androidx.window#androidx.window:window-extensions

    Are we supposed to be using this somehow? It's only in alpha.

    No. It was bound when androidx.window.* was in preview for Screen Duo work, but not touched/updated afterwards.

    https://github.com/xamarin/AndroidX/blob/main/config.json#L1325-L1348

    see my comment:

    #6809 (comment)

  13. workgroupengineering commented on Sep 5, 2022

    @workgroupengineering

    the warnings are still present in Visual Studio Version 17.3.0 Preview 6.0

  14. moljac commented on Sep 5, 2022

    @moljac
    Contributor

    the warnings are still present in Visual Studio Version 17.3.0 Preview 6.0

    Thanks for the feedback, but Visual Studio version has nothing to do with this issue.

    See: #6809 (comment)

  15. changed the title [-]VS2022 17.2.0 Preview 1.0 – Warnings not seen before.[/-] [+]Missing `androidx.window.[extensions|sidecar]` warnings[/+] on Sep 14, 2022
  16. rvalitov commented on Mar 20, 2023

    @rvalitov

    I still get all the same warnings as to when I first reported it. I'm now using VS2022 17.3.0 Prev 1.1

    @gmck

    These warnings are coming from AndroidX (Xamarin.AndroidX.Window), VS updates will not fix it.

    I have the same warnings after upgrading the project to a newer Xamarin version using VS 17.5.2. I didn't have the Xamarin.AndroidX.Window package installed but still I got the errors. After installing this package just to test there were no changes in the build output log.

  17. added a commit that references this issue on Feb 5, 2024
  18. ivmirx commented on Jun 10, 2024

    @ivmirx

    Both warnings are still present after migrating a Xamarin.Android app to .NET 8

  19. added 4 commits that reference this issue on Jul 8, 2024
    ca1aa1d
    c380673
    dc5dd36
    4f2ca29
  20. added a commit that references this issue on Jul 19, 2024
    45855b8
  21. locked and limited conversation to collaborators on Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions