Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Oct 13, 2025

We found the following errors with many javac errors:

class MyTextObjectFont : Android.Graphics.Pdf.Component.PdfPageTextObjectFont
{
    public MyTextObjectFont(Android.Graphics.Pdf.Component.PdfPageTextObjectFont font) : base(font)
    {
    }
}

Such as:

obj\Debug\net10.0-android36.1\android\src\crc643b87557a63e7c027\MainActivity_MyTextObjectFont.java(5,40): error JAVAC0000:  error: package android.graphics.pdf.component does not exist
    extends android.graphics.pdf.component.PdfPageTextObjectFont

This appears to be caused by the use of:

"C:\Program Files (x86)\Android\android-sdk\platforms\android-36\android.jar"

When the build should be using:

"C:\Program Files (x86)\Android\android-sdk\platforms\android-36.1\android.jar"

Update various MSBuild logic to handle non-integer API levels.

API Level Property Standardization

  • Replaced AndroidSdkPlatform with AndroidApiLevel in all relevant MSBuild targets and task classes, including Aapt2Link, GenerateMainAndroidManifest, GetJavaPlatformJar, and others.

Parsing and Usage Improvements

  • Updated logic to parse AndroidApiLevel using MonoAndroidHelper.TryParseApiLevel where necessary, supporting both major and minor versions and defaulting to sensible values when parsing fails.

Code Cleanup and Refactoring

  • Removed unused or obsolete parameters and code paths related to AndroidSdkPlatform in several classes and methods, such as GenerateJavaStubs and JCWGenerator.
  • Updated test cases for CheckGoogleSdkRequirements to use AndroidApiLevel instead of TargetFrameworkVersion, and corrected assertions for warnings and errors.

MSBuild Targets Updates

  • Modified MSBuild target files to use the new AndroidApiLevel property, ensuring that all build steps and tooling reference the correct property name.

We found the following errors with many `javac` errors:

    class MyTextObjectFont : Android.Graphics.Pdf.Component.PdfPageTextObjectFont
    {
        public MyTextObjectFont(Android.Graphics.Pdf.Component.PdfPageTextObjectFont font) : base(font)
        {
        }
    }

Such as:

    obj\Debug\net10.0-android36.1\android\src\crc643b87557a63e7c027\MainActivity_MyTextObjectFont.java(5,40): error JAVAC0000:  error: package android.graphics.pdf.component does not exist
        extends android.graphics.pdf.component.PdfPageTextObjectFont

This appears to be caused by the use of:

    "C:\Program Files (x86)\Android\android-sdk\platforms\android-36\android.jar"

When the build *should* be using:

    "C:\Program Files (x86)\Android\android-sdk\platforms\android-36.1\android.jar"

Update various MSBuild logic to handle non-integer API levels.

Co-authored-by: Jonathan Pryor <jonpryor@vt.edu>
@jonathanpeppers jonathanpeppers marked this pull request as ready for review October 17, 2025 20:57
@jonathanpeppers jonathanpeppers merged commit ec3d578 into main Oct 20, 2025
59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/android-36.1 branch October 20, 2025 18:42
jonathanpeppers added a commit that referenced this pull request Oct 20, 2025
We found the following errors with many `javac` errors:

    class MyTextObjectFont : Android.Graphics.Pdf.Component.PdfPageTextObjectFont
    {
        public MyTextObjectFont(Android.Graphics.Pdf.Component.PdfPageTextObjectFont font) : base(font)
        {
        }
    }

Such as:

    obj\Debug\net10.0-android36.1\android\src\crc643b87557a63e7c027\MainActivity_MyTextObjectFont.java(5,40): error JAVAC0000:  error: package android.graphics.pdf.component does not exist
        extends android.graphics.pdf.component.PdfPageTextObjectFont

This appears to be caused by the use of:

    "C:\Program Files (x86)\Android\android-sdk\platforms\android-36\android.jar"

When the build *should* be using:

    "C:\Program Files (x86)\Android\android-sdk\platforms\android-36.1\android.jar"

Update various MSBuild logic to handle non-integer API levels.

**API Level Property Standardization**

* Replaced `AndroidSdkPlatform` with `AndroidApiLevel` in all relevant
  MSBuild targets and task classes, including `Aapt2Link`,
  `GenerateMainAndroidManifest`, `GetJavaPlatformJar`, and others.

**Parsing and Usage Improvements**

* Updated logic to parse `AndroidApiLevel` using
  `MonoAndroidHelper.TryParseApiLevel` where necessary, supporting
  both major and minor versions and defaulting to sensible values when
  parsing fails.

**Code Cleanup and Refactoring**

* Removed unused or obsolete parameters and code paths related to
  `AndroidSdkPlatform` in several classes and methods, such as
  `GenerateJavaStubs` and `JCWGenerator`.
* Updated test cases for `CheckGoogleSdkRequirements` to use
  `AndroidApiLevel` instead of `TargetFrameworkVersion`, and corrected
  assertions for warnings and errors.

**MSBuild Targets Updates**

* Modified MSBuild target files to use the new `AndroidApiLevel`
  property, ensuring that all build steps and tooling reference the
  correct property name.
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants