Android Build Failure - PDFbox

My project is on a windows machine and it errors out after using the PDFbox library.

> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }
  ...

  The first 3 errors (out of 10) were:
  D:\a\printola-v3\printola-v3\app\build.gradle: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
  C:\Users\runneradmin\.gradle\caches\modules-2\files-2.1\org.apache.pdfbox\fontbox\2.0.0\6f762d4e1c8ea99589d30597ef3731dfdcee43e2\fontbox-2.0.0.jar: Error: Invalid package reference in org.apache.pdfbox:fontbox; not included in Android: java.awt.geom. Referenced from org.apache.fontbox.FontBoxFont. [InvalidPackage]
  C:\Users\runneradmin\.gradle\caches\modules-2\files-2.1\org.apache.pdfbox\pdfbox\2.0.0\c46498f7a734616d0b81e4ea99fd751a17dc34fd\pdfbox-2.0.0.jar: Error: Invalid package reference in org.apache.pdfbox:pdfbox; not included in Android: java.awt.color. Referenced from org.apache.pdfbox.pdmodel.graphics.blend.BlendComposite.BlendCompositeContext. [InvalidPackage]



* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Workflow file:

name: Build & Publish Debug APK
on: [push, pull_request]
jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Make Gradle executable
      run: chmod +x ./gradlew
    - name: Build with Gradle
      run: ./gradlew build
    - name: Build Debug APK
      run: ./gradlew assembleDebug
    - name: Upload a Build Artifact
      uses: actions/upload-artifact@v2
      with:
        name: Upload app-debug
        path: ./app/build/outputs/apk/debug/app-debug.apk

Hi @darkabhi ,

The error should be caused by your gradle code but not related to Github Actions. 

Please follow below tickets for a try:

https://stackoverflow.com/questions/46989310/commons-logging-defines-classes-that-conflict-with-classes-now-provided-by-andro

https://github.com/getsentry/sentry-java/issues/571#issuecomment-378295015

It’s recommended to raise the query here gradle topic related for more help.

Thanks.