You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New bunch of warnings using Xamarin.AndroidX.Annotations 1.6.0 #727
changed the title [-]New bunch of warnings using VS 2022 17.6.0 Prev 6.0[/-][+]New bunch of warnings using Xamarin.AndroidX.Annotations 1.6.0[/+]on May 8, 2023
@moljac
Can you explain how this update works? I don't see any updates when I click on updates in the NuGet package manager.
Were you able to build the supplied test app without all those warnings?
Thanks for your reply. I didn't realize that it had not been published. I thought that your comment above "Added new bindings" meant that it had been published.
While you are here can you comment on the missing methods OnPrepareMenu, OnMenuClosed in AndroidX.Core.View. per #611, as referenced in #718 Enable DIM for AndroidX packages.
Thanks for your reply. I didn't realize that it had not been published. I thought that your comment above "Added new bindings" meant that it had been published.
Our process is far more complicated now than it was 2-3 years ago (reviews, security and quality checks, you_name_it) and it takes longer just to fight through all steps. Then if I am out of luck I hit stuff like:
CI windows only (mac is greeen all the time):
========================================
ci-setup
========================================
========================================
javadocs
========================================
An error occurred when executing task 'javadocs'.
Error: One or more errors occurred. (The SSL connection could not be established, see inner exception.)
The SSL connection could not be established, see inner exception.
##[error]PowerShell exited with code '1'.
and have to restart pipelines.
Due to the fact I try to stay sane - I did not look at the problem. Simply restarting helps, but it takes time.
While you are here can you comment on the missing methods OnPrepareMenu, OnMenuClosed in AndroidX.Core.View. per #611, as referenced in #718 Enable DIM for AndroidX packages.
Is this the same thing - Not published yet
No. I don't think so. Or... It could be. Not sure without diving in deeper.
Our tooling is not perfect and even worse - environment changes (tools, languages like java and kotlin), so it could be tons of reasons. In this case java classes (code) was moved to other artifact with -jvm (google does move very often).
I upgraded the test project to the latest NuGets and I still have a problem with these warnings.
The warnings are still present if you just do a build. However, if you then deploy the warnings disappear other than the two warnings androidx.window.extensions.jar and androidx.window.sidecar.jar which have been there forever.
If you do a clean and then just Deploy, it builds and the deploy succeeds, but you get all the warnings. If you then just deploy again, it deploys in just over 1 sec and the error list clears except for the two androidx.window warnings above.
You should be able to reproduce it with the upgraded sample. The sample also includes a working OnPrepareMenu in the HomeFragment.cs
I upgraded the test project to the latest NuGets and I still have a problem with these warnings.
Can you try Xamarin.AndroidX.Annotation.1.6.0.3 please?
The warnings are still present if you just do a build. However, if you then deploy the warnings disappear other than the two warnings androidx.window.extensions.jar and androidx.window.sidecar.jar which have been there forever.
Previous rounds of published packages were not focused to fix these warnings. Fix was published few days ago.
<?xml version="1.0" encoding="UTF-8"?>
<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- This module was also published with a richer model, Gradle metadata, --><!-- which should be used instead. Do not delete the following line which --><!-- is to indicate to Gradle or any Gradle module metadata file consumer --><!-- that they should prefer consuming it instead. --><!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>androidx.annotation</groupId>
<artifactId>annotation</artifactId>
<version>1.6.0</version>
<name>Android Support Library Annotations</name>
<description>The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs.</description>
<url>https://developer.android.com/jetpack/androidx/releases/annotation#1.6.0</url>
<inceptionYear>2013</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>The Android Open Source Project</name>
</developer>
</developers>
<scm>
<connection>scm:git:https://android.googlesource.com/platform/frameworks/support</connection>
<url>https://cs.android.com/androidx/platform/frameworks/support</url>
</scm>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.8.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
annotation-jvm:1.6.0.pom
<?xml version="1.0" encoding="UTF-8"?>
<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- This module was also published with a richer model, Gradle metadata, --><!-- which should be used instead. Do not delete the following line which --><!-- is to indicate to Gradle or any Gradle module metadata file consumer --><!-- that they should prefer consuming it instead. --><!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>androidx.annotation</groupId>
<artifactId>annotation-jvm</artifactId>
<version>1.6.0</version>
<name>Android Support Library Annotations</name>
<description>The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs.</description>
<url>https://developer.android.com/jetpack/androidx/releases/annotation#1.6.0</url>
<inceptionYear>2013</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>The Android Open Source Project</name>
</developer>
</developers>
<scm>
<connection>scm:git:https://android.googlesource.com/platform/frameworks/support</connection>
<url>https://cs.android.com/androidx/platform/frameworks/support</url>
</scm>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.8.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Can you try Xamarin.AndroidX.Annotation.1.6.0.3, please?
When I check for updates none are found. Is this to be expected?
If I add 1.6.0.3 manually to the project the warnings do go away.
However, how is one meant to know that this particular NuGet is required? @jonathanpeppers originally picked up on reason: class file for androidx.annotation.RestrictTo$Scope not found which eventually led to the fix.
Could the build system be improved to emit some sort of warning/error indicating that Xamarin.AndroidX.Annotation is required?
If I add 1.6.0.3 manually to the project the warnings do go away.
However, how is one meant to know that this particular NuGet is required?
It is not. Only for warnings, because code was moved.
@jonathanpeppers originally picked up on reason: class file for androidx.annotation.RestrictTo$Scope not found which eventually led to the fix.
Could the build system be improved to emit some sort of warning/error indicating that Xamarin.AndroidX.Annotation is required?
Android build system (dependencies) rely on POM files, so we do. This particular POM file did not indicate that annotation-jvm was needed as dependency. Warnings (missing fileds and classes) forced us to check what is going on. The issue was not functional blocker, more aesthetic.
When building AX or GPS-FB-MLKit there are quite a lot "missing class" warnings and I usually ignore them. I dive only if those are culprit that something was not surfaced/bound. Simply resource optimization (my day is 24 hrs too).
Activity
jonathanpeppers commentedon May 8, 2023
There are no Android workload changes between these two builds of Visual Studio.
One error message, I see when I build this project is:
Are we sure it wasn't the latest AndroidX packages that caused this?
There are 102 Warning(s) like this, but no other information:
jpobst commentedon May 8, 2023
It looks like the
androidx.annotations.annotations.jarchanged dramatically between version1.5.0and1.6.0.1.5.0
Link: https://maven.google.com/web/index.html#androidx.annotation:annotation:1.5.0
1.6.0
Link: https://maven.google.com/web/index.html#androidx.annotation:annotation:1.6.0
We will need to investigate where that code went.
[-]New bunch of warnings using VS 2022 17.6.0 Prev 6.0[/-][+]New bunch of warnings using Xamarin.AndroidX.Annotations 1.6.0[/+]jpobst commentedon May 8, 2023
It looks like the code was moved to:
https://maven.google.com/web/index.html#androidx.annotation:annotation-jvm:1.6.0
Unfortunately this appears to use some new system that is not POM files or anything else we have built support for.
The easiest fix would probably be to bind this as a new package and manually add it as a dependency of the
Xamarin.AndroidX.Annotationpackage.moljac commentedon May 16, 2023
Added new bindings for
androidx.annotation:aanotations-jvmJAR in #724https://github.com/xamarin/AndroidX/pull/724/files#diff-45a0a38d395bf4427d0291d9c72bd99b57fa43e14b00e059ae170d657949f1f2R95-R105
gmck commentedon May 17, 2023
@moljac
Can you explain how this update works? I don't see any updates when I click on updates in the NuGet package manager.
Were you able to build the supplied test app without all those warnings?
moljac commentedon May 20, 2023
No, I cannot explain. Trying to find some clues.
Not published yet.
PR: #724
No. I get the same warnings with all samples.
gmck commentedon May 23, 2023
@moljac
Thanks for your reply. I didn't realize that it had not been published. I thought that your comment above "Added new bindings" meant that it had been published.
While you are here can you comment on the missing methods OnPrepareMenu, OnMenuClosed in AndroidX.Core.View. per #611, as referenced in #718 Enable DIM for AndroidX packages.
Is this the same thing - Not published yet
moljac commentedon May 23, 2023
In the meantime:
https://www.nuget.org/packages/Xamarin.AndroidX.Annotation.Jvm
Our process is far more complicated now than it was 2-3 years ago (reviews, security and quality checks, you_name_it) and it takes longer just to fight through all steps. Then if I am out of luck I hit stuff like:
CI windows only (mac is greeen all the time):
and have to restart pipelines.
Due to the fact I try to stay sane - I did not look at the problem. Simply restarting helps, but it takes time.
No. I don't think so. Or... It could be. Not sure without diving in deeper.
Our tooling is not perfect and even worse - environment changes (tools, languages like java and kotlin), so it could be tons of reasons. In this case java classes (code) was moved to other artifact with
-jvm(google does move very often).gmck commentedon May 26, 2023
@moljac, @jpobst
I upgraded the test project to the latest NuGets and I still have a problem with these warnings.
The warnings are still present if you just do a build. However, if you then deploy the warnings disappear other than the two warnings androidx.window.extensions.jar and androidx.window.sidecar.jar which have been there forever.
If you do a clean and then just Deploy, it builds and the deploy succeeds, but you get all the warnings. If you then just deploy again, it deploys in just over 1 sec and the error list clears except for the two androidx.window warnings above.
You should be able to reproduce it with the upgraded sample. The sample also includes a working OnPrepareMenu in the HomeFragment.cs
Now using 17.7.0 P1.0
moljac commentedon Jun 8, 2023
Can you try
Xamarin.AndroidX.Annotation.1.6.0.3please?Previous rounds of published packages were not focused to fix these warnings. Fix was published few days ago.
Fixed in
#738
It is not VS or .NET SDK issue, but AndroidX package[s]. Namely google moves code around and now it is in
annotation-jvmartifact.https://maven.google.com/web/index.html?q=androidx.annotation#androidx.annotation
annotation:1.6.0.pom:annotation-jvm:1.6.0.pomgmck commentedon Jun 9, 2023
@moljac , @jpobst , @jonathanpeppers
Can you try Xamarin.AndroidX.Annotation.1.6.0.3, please?
When I check for updates none are found. Is this to be expected?
If I add 1.6.0.3 manually to the project the warnings do go away.
However, how is one meant to know that this particular NuGet is required? @jonathanpeppers originally picked up on reason: class file for androidx.annotation.RestrictTo$Scope not found which eventually led to the fix.
Could the build system be improved to emit some sort of warning/error indicating that Xamarin.AndroidX.Annotation is required?
moljac commentedon Jun 9, 2023
True. 1.6.0.3 is not listed. Not sure why.
https://www.nuget.org/packages/Xamarin.AndroidX.Annotation.Jvm/1.6.0.3
It is not. Only for warnings, because code was moved.
@jonathanpeppers originally picked up on reason: class file for androidx.annotation.RestrictTo$Scope not found which eventually led to the fix.
Android build system (dependencies) rely on POM files, so we do. This particular POM file did not indicate that
annotation-jvmwas needed as dependency. Warnings (missing fileds and classes) forced us to check what is going on. The issue was not functional blocker, more aesthetic.When building AX or GPS-FB-MLKit there are quite a lot "missing class" warnings and I usually ignore them. I dive only if those are culprit that something was not surfaced/bound. Simply resource optimization (my day is 24 hrs too).
jpobst commentedon Jul 27, 2023
This should be fixed in Xamarin.AndroidX.Annotation 1.6.0.4.
Android Release 1.0.5